module documentation

JsLex: a lexer for JavaScript

Class JsLexer A JavaScript lexer
Class Lexer A generic multi-state regex-based lexer.
Class Tok A specification for a token class.
Function literals Create a regex from a space-separated list of literal `choices`.
Function prepare_js_for_gettext Convert the JavaScript source `js` into something resembling C for xgettext.
def literals(choices, prefix='', suffix=''): (source)

Create a regex from a space-separated list of literal `choices`. If provided, `prefix` and `suffix` will be attached to each choice individually.

def prepare_js_for_gettext(js): (source)

Convert the JavaScript source `js` into something resembling C for xgettext. What actually happens is that all the regex literals are replaced with "REGEX".