class JsLexer(Lexer):
A JavaScript lexer
>>> lexer = JsLexer() >>> list(lexer.lex("a = 1")) [('id', 'a'), ('ws', ' '), ('punct', '='), ('ws', ' '), ('dnum', '1')]
This doesn't properly handle non-ASCII characters in the JavaScript source.
Method | __init__ |
Undocumented |
Class Variable | both​_after |
Undocumented |
Class Variable | both​_before |
Undocumented |
Class Variable | states |
Undocumented |
Inherited from Lexer
:
Method | lex |
Lexically analyze text . |
Instance Variable | regexes |
Undocumented |
Instance Variable | state |
Undocumented |
Instance Variable | toks |
Undocumented |