summaryrefslogtreecommitdiffstats
path: root/mycli/lexer.py
blob: 4b14d72deae5c3c01ff3d62bc17d8ab98aed7e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
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],
    }