Expand description
JavaScript language adapter.
Structs§
Constants§
Functions§
- apply_
ecmascript_ assigned_ member_ callable_ owners - Model classic ECMAScript object/prototype methods from their assignment syntax.
- apply_
javascript_ getter_ property_ sources - apply_
js_ ts_ commonjs_ named_ export_ aliases - Surface JS/TS named exports under their public export member name when it differs from the local implementation name:
- apply_
js_ ts_ default_ export_ aliases - Surface ECMAScript
export defaultand CommonJSmodule.exports = function ...as an additional callable/type binding nameddefaultin the exporting module. The original declaration remains indexed by its real local name, so same-file references still resolve while default imports / callable CommonJS requires can target the language-level export name. - ecmascript_
static_ subscript_ key - extract_
ecmascript_ pseudo_ call - Lower JSX/TSX opening elements to their component-call semantics. The concrete grammar vocabulary lives here and is shared only with the TypeScript adapter, which uses the same ECMAScript frontend shapes.
- js_
ts_ imports - Shared ES-module import parser used by both the JavaScript and
TypeScript adapters. Handles:
import x from "y"— default importimport { a, b as c } from "z"— named imports + aliasimport * as ns from "n"— namespace import - js_
ts_ module_ segments - Split a workspace-relative JS/TS path into module-identity segments.
The trailing source extension is stripped so
src/utils/log.tsbecomes["src", "utils", "log"]. Skips path roots and parent (..) components. - js_
ts_ require_ calls - populate_
ecmascript_ compiler_ facts - Attach ECMAScript-specific syntax meaning to the language-neutral compiler IR. TypeScript deliberately reuses this lowering because its expression grammar extends ECMAScript; downstream engines see only typed boolean relations and exact decoded literal values.