From b0d9da05cf24381d9bb03ff2854d502d2e73bbdd Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Mon, 30 May 2016 13:56:07 -0400 Subject: Added ufixed and fixed keywords --- docs/utils/SolidityLexer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/utils/SolidityLexer.py b/docs/utils/SolidityLexer.py index d05c7b0c..b3aed74b 100644 --- a/docs/utils/SolidityLexer.py +++ b/docs/utils/SolidityLexer.py @@ -63,7 +63,9 @@ class SolidityLexer(RegexLexer): '|'.join( ['uint%d' % (i + 8) for i in range(0, 256, 8)] + ['int%d' % (i + 8) for i in range(0, 256, 8)] + - ['bytes%d' % (i + 1) for i in range(0, 32)] + ['bytes%d' % (i + 1) for i in range(0, 32)] + + ['ufixed%dx%d' % ((i), (j + 8)) for i in range(0, 256, 8) for j in range(0, 256 - i, 8)] + + ['fixed%dx%d' % ((i), (j + 8)) for i in range(0, 256, 8) for j in range(0, 256 - i, 8)] ) + r')\b', Keyword.Type, 'slashstartsregex'), (r'(abstract|boolean|byte|char|class|const|debugger|double|enum|export|' r'extends|final|float|goto|implements|int|interface|long|native|' -- cgit From cb0b2286c1759a1387d74aa128853e72bc58de89 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Mon, 30 May 2016 13:59:25 -0400 Subject: Added library keyword --- docs/utils/SolidityLexer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/utils/SolidityLexer.py b/docs/utils/SolidityLexer.py index b3aed74b..779147f4 100644 --- a/docs/utils/SolidityLexer.py +++ b/docs/utils/SolidityLexer.py @@ -58,7 +58,7 @@ class SolidityLexer(RegexLexer): r'throw|try|catch|finally|new|delete|typeof|instanceof|void|' r'this|import|mapping|returns|private|public|external|internal|' r'constant|memory|storage)\b', Keyword, 'slashstartsregex'), - (r'(var|let|with|function|event|modifier|struct|enum|contract)\b', Keyword.Declaration, 'slashstartsregex'), + (r'(var|let|with|function|event|modifier|struct|enum|contract|library)\b', Keyword.Declaration, 'slashstartsregex'), (r'(bytes|string|address|uint|int|bool|byte|' + '|'.join( ['uint%d' % (i + 8) for i in range(0, 256, 8)] + -- cgit