GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
LaTeX
Browse code
Merge branch 'master' of https://github.com/Otago-InfoSci-Database/LaTeX into master
master
commit
9f97fb63a9ed2d150a00306802df53e1bf7ac875
2 parents
a507df3
+
86a8960
Nigel Stanger
authored
on 23 Sep 2020
Patch
Showing
1 changed file
minted/orientdb.py
Ignore Space
Show notes
View
minted/orientdb.py
0 → 100644
# -*- coding: utf-8 -*- """ OrientDB SQL lexer ~~~~~~~~~~~ Pygments lexer for OrientDB SQL. """ from pygments.lexers.sql import SqlLexer from pygments.token import Name, Keyword __all__ = ['OrientDBLexer'] class OrientDBLexer(SqlLexer): name = 'OrientDB' aliases = ['orientdb'] filenames = ['*.sql'] # just to have one if you whant to use EXTRA_KEYWORDS = ['property', 'extends', 'link', 'mandatory', 'edge', 'to', 'traverse', 'unwind', 'inE'] def get_tokens_unprocessed(self, text): for index, token, value in SqlLexer.get_tokens_unprocessed(self, text): if token is Name and value in self.EXTRA_KEYWORDS: yield index, Keyword, value else: yield index, token, value
Show line notes below