diff options
author | chriseth <chris@ethereum.org> | 2016-08-27 00:52:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-27 00:52:57 +0800 |
commit | 67d06bbd5f93ba672764b411f6d125cd3f79aeee (patch) | |
tree | 449198fb9c7ed46dfb5b55a1e015b0b38cc9cc6c | |
parent | 83160d56f3827fce5394339937ffc9c588a3633e (diff) | |
parent | cb0b2286c1759a1387d74aa128853e72bc58de89 (diff) | |
download | dexon-solidity-67d06bbd5f93ba672764b411f6d125cd3f79aeee.tar dexon-solidity-67d06bbd5f93ba672764b411f6d125cd3f79aeee.tar.gz dexon-solidity-67d06bbd5f93ba672764b411f6d125cd3f79aeee.tar.bz2 dexon-solidity-67d06bbd5f93ba672764b411f6d125cd3f79aeee.tar.lz dexon-solidity-67d06bbd5f93ba672764b411f6d125cd3f79aeee.tar.xz dexon-solidity-67d06bbd5f93ba672764b411f6d125cd3f79aeee.tar.zst dexon-solidity-67d06bbd5f93ba672764b411f6d125cd3f79aeee.zip |
Merge pull request #957 from Denton-L/modify-lexer
Modify documentation lexer
-rw-r--r-- | docs/utils/SolidityLexer.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/utils/SolidityLexer.py b/docs/utils/SolidityLexer.py index d05c7b0c..779147f4 100644 --- a/docs/utils/SolidityLexer.py +++ b/docs/utils/SolidityLexer.py @@ -58,12 +58,14 @@ 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)] + ['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|' |