api

CompilerLexer.ch

Declarations in CompilerLexer.ch

1 declarationsjs_cbi_lexer

Declarations

Public only
nextJsToken#
Publicfunction
func nextJsToken(js : &JsLexer, lexer : &Lexer, jsx_enabled : bool) : Token
Shared compiler-side lexer for JavaScript / JSX macro bodies. One implementation with a mode flag, replacing the near-duplicate `getNextToken` in `js_cbi` and `universal_cbi`. `jsx_enabled = false` behaves as plain JavaScript (`<` is comparison/shift, `state` is an identifier, and `??`/`?.`/`**` are not produced); `jsx_enabled = true` runs the JSX state machine. Embedded Chemical `${...}` handling is shared by both modes.