2025-02-09 18:53:36 +01:00
|
|
|
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 = {
|
2025-02-09 19:16:42 +01:00
|
|
|
"root": [(r"\brepair\b", Keyword), (r"\boffset\b", Keyword), inherit],
|
2025-02-09 18:53:36 +01:00
|
|
|
}
|