Class JsLexer

A Javascript lexer

Declaration

class JsLexer(Lexer)
source link

Documentation

>>> 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.

Methods

Inherited methods