diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-08 11:28:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-02-08 11:28:14 +0000 |
commit | b678a621c57a6d3fdfac14bdbbef0ed743ab1742 (patch) | |
tree | 5481c14ce75dfda9c55721de033992b45ab0e1dc /mycli/lexer.py | |
parent | Initial commit. (diff) | |
download | mycli-b678a621c57a6d3fdfac14bdbbef0ed743ab1742.tar.xz mycli-b678a621c57a6d3fdfac14bdbbef0ed743ab1742.zip |
Adding upstream version 1.22.2.upstream/1.22.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mycli/lexer.py')
-rw-r--r-- | mycli/lexer.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mycli/lexer.py b/mycli/lexer.py new file mode 100644 index 0000000..4b14d72 --- /dev/null +++ b/mycli/lexer.py @@ -0,0 +1,12 @@ +from pygments.lexer import inherit +from pygments.lexers.sql import MySqlLexer +from pygments.token import Keyword + + +class MyCliLexer(MySqlLexer): + """Extends MySQL lexer to add keywords.""" + + tokens = { + 'root': [(r'\brepair\b', Keyword), + (r'\boffset\b', Keyword), inherit], + } |