nx_js_parse.nx
buildroot/runtime/nx_js_parse.nx
about
nx_js_parse.nx -- R-JS-PARSE (WB-JS-001 rung 1): the ECMAScript PARSER, riding
the rung-0 tokenizer (nx_js_lex.nx) per the no-floating law -- the lexer is built
+ gated BEFORE this parser composes it. Shape = RECURSIVE-DESCENT over the flat
token stream, producing an AST in a FLAT i64 ARENA (parallel slots per node, NO
struct complexity). Founds R-JS-EVAL above it (the interpreter rides the AST).
Consumes nx_js_lex's token stream (3 i64/token: kind, start-offset, byte-length)
and js_lexeme_eq for keyword/punct matching. Produces nodes in a node arena
(NODE_SLOTS i64 each) + a child-index arena for variable-arity lists (PROGRAM
statement list, BLOCK body, CALL arguments, function params).
SCOPE (rung 1) -- every sub-feature below is now GATED by a KAT that asserts its
node (council BLOCKER fix: the prior 'ALL gated' header listed paths with ZERO
coverage -- string/null/bool/typeof/unary +-/ the '/ %' '< <= > >=' '!= === !=='
operator families were code-present-but-unasserted; KAT9/10 now assert them):
- primary: identifier, number, STRING, true/false (BOOL), null, ( expr )
- postfix chains (left-assoc): member a.b, computed index a[b], call f(args...)
- unary prefix: ! - + typeof
- binary with CORRECT precedence + associativity (highest -> lowest):
(* / %) > (+ -) > (< <= > >=) > (== != === !==) > (&&) > (||)
all left-associative; assignment `=` is RIGHT-assoc and LOWEST.
- statements: var/let/const decl (optional initializer), expression statement,
return [expr] ;, block { ... }, if (cond) stmt [else stmt], while (cond) stmt,
function decl function name(params){body}
- PROGRAM = list of statements
ERROR CONTRACT (honest -- what the parser DOES and does NOT enforce):
- Semicolons are OPTIONAL via ASI-lite: a statement may end without ';' ONLY at
a line terminator, before '}', or at EOF. Two statements on ONE line with no
separator (`a b`, `1 2`) are REJECTED (ERROR node + err flag) -- real JS
SyntaxError. (Council BLOCKER fix: previously `;` was unconditionally optional
so adjacent same-line statements were silently accepted.)
- Assignment requires a valid lvalue target (IDENT / MEMBER / INDEX). '1 = 2'
and '(a+b) = c' are REJECTED (real JS: Invalid left-hand side). (BLOCKER fix.)
- Unbalanced parens, missing operands, declarations with no name, dangling
operators, unterminated blocks -> ERROR node + err flag.
- NOT enforced (honest OPEN, NOT claimed): full ASI restricted-production rules
(e.g. `return`-newline-expr nuance), strict-mode lvalue refinements, label
scoping. These are rung-1b; the gate does NOT assert them.
dependencies 2 imports · 2 importers
imports: nx_js_lex.nxnx_itoa_lib.nx
imported by: nx_js_eval.nxnx_js_octane_next_diag.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 86 | const ND_MAGIC_1024: i64 = 1024 |
| 87 | const ND_MAGIC_2048: i64 = 2048 |
| 88 | const ND_MAGIC_4096: i64 = 4096 |
| 89 | const ND_MAGIC_65536: i64 = 65536 |
| 90 | const ND_MAGIC_131072: i64 = 131072 |
| 93 | const ND_ERROR: i64 = 0 |
| 94 | const ND_PROGRAM: i64 = 1 |
| 95 | const ND_NUMBER: i64 = 2 |
| 96 | const ND_STRING: i64 = 3 |
| 97 | const ND_IDENT: i64 = 4 |
| 98 | const ND_BOOL: i64 = 5 |
| 99 | const ND_NULL: i64 = 6 |
| 100 | const ND_BINARY: i64 = 7 |
| 101 | const ND_UNARY: i64 = 8 |
| 102 | const ND_ASSIGN: i64 = 9 |
| 103 | const ND_CALL: i64 = 10 |
| 104 | const ND_MEMBER: i64 = 11 // a.b (b is an IDENT node) |
| 105 | const ND_INDEX: i64 = 12 // a[b] (b is an expr node) |
| 106 | const ND_VAR_DECL: i64 = 13 // a=name IDENT node, b=init expr node (-1 if none) |
| 107 | const ND_EXPR_STMT: i64 = 14 |
| 108 | const ND_RETURN: i64 = 15 // a=expr node (-1 if bare `return;`) |
| 109 | const ND_BLOCK: i64 = 16 // list-node: a=child_start, b=child_count |
| 110 | const ND_IF: i64 = 17 // a=cond, b=then-stmt, c=else-stmt (-1 if none) |
| 111 | const ND_WHILE: i64 = 18 // a=cond, b=body |
| 112 | const ND_FUNC_DECL: i64 = 19 // a=name IDENT, b=params list-node, c=body BLOCK |
| 113 | const ND_PARAMS: i64 = 20 // list-node: a=child_start, b=child_count |
| 114 | const ND_OBJECT: i64 = 21 // object literal {k:v,...}: list-node a=child_start, b=prop_count (children are ND_PROP) |
| 115 | const ND_ARRAY: i64 = 22 // array literal [e0,e1,...]: list-node a=child_start, b=elem_count |
| 116 | const ND_PROP: i64 = 23 // object property: tokidx=key token (IDENT or STRING), a=value-expr node |
| 118 | const ND_FOR: i64 = 24 // for(init;cond;update) body: a=init, b=cond, c=update, tokidx-slot=body (all may be -1 except body) |
| 119 | const ND_TERNARY: i64 = 25 // cond ? a : b -> a=cond, b=then-expr, c=else-expr |
| 120 | const ND_BREAK: i64 = 26 // break; (statement, no children) |
| 121 | const ND_CONTINUE: i64 = 27 // continue; (statement, no children) |
| 122 | const ND_DOWHILE: i64 = 28 // do body while(cond): a=cond, b=body |
| 124 | const ND_FOR_OF: i64 = 29 // for(var x of iter) body: a=var-target(VAR_DECL|IDENT), b=iterable-expr, c=body |
| 125 | const ND_FOR_IN: i64 = 30 // for(var k in obj) body: a=var-target(VAR_DECL|IDENT), b=object-expr, c=body |
| 126 | const ND_SWITCH: i64 = 31 // switch(disc){...}: LIST-node a=case_list_child_start, b=case_count, c=disc-expr (children=ND_CASE; a/b match jp_child_at) |
| 127 | const ND_CASE: i64 = 32 // one case/default clause: LIST-node a=stmt_list_child_start, b=stmt_count, c=case-expr(-1 for default) |
| 128 | const ND_SPREAD: i64 = 33 // ...expr (spread element in an array literal; a=inner expr) |
| 129 | const ND_ARRAY_PAT: i64 = 34 // [a,b] destructuring pattern (var-decl target); children = name IDENTs |
| 130 | const ND_OBJ_PAT: i64 = 35 // {a,b} destructuring pattern (shorthand); children = name IDENTs |
| 131 | const ND_TEMPLATE: i64 = 36 // template literal (tokidx = whole template token; interior decoded at eval) |
| 132 | const ND_THIS: i64 = 37 // the `this` keyword (eval resolves via the call frame's this binding) |
| 133 | const ND_NEW: i64 = 38 // new C(args): extra=0 -> a=ND_CALL node; extra=1 -> a=callee (bare `new C`) |
| 134 | const ND_UPDATE: i64 = 39 // ++x/--x/x++/x-- : a=lvalue (IDENT/MEMBER/INDEX); extra: 1=++pre 2=--pre 3=++post 4=--post |
| 135 | const ND_TRY: i64 = 40 // try{a}catch(b){c}finally{slot4}: a=try BLOCK, b=catch-param IDENT(-1), c=catch BLOCK(-1), tokidx-slot=finally BLOCK(-1) |
| 136 | const ND_THROW: i64 = 41 // throw expr: a=expr |
| 137 | const ND_VAR_LIST: i64 = 42 // multi-declarator `var a, b=c, d;` -- LIST-node a=child_start b=count (children=ND_VAR_DECL) |
| 138 | const ND_CLASS: i64 = 43 // class Name{constructor(){} m(){}...}: a=name IDENT, b=ctor ND_FUNC_DECL, c=methods ND_BLOCK (each child = a method ND_FUNC_DECL whose name IDENT is the method name); prototype methods -> instances via func_prototype+obj_set |
| 139 | const ND_REGEX: i64 = 44 // regex literal: tokidx = whole /pattern/flags token; pattern+flags extracted + compiled (nx_rxfull) at eval |
| 140 | const ND_SUPER: i64 = 45 // the `super` keyword -- only valid as a call callee (super(...)=parent ctor) or member object (super.m(...)=parent method); eval routes both in js_eval_call |
| 141 | const ND_SEQ: i64 = 46 // comma/sequence expr `a, b, c` -- LIST node a=child_start b=count; eval each, value = last |
| 142 | const ND_HOLE: i64 = 47 // ARRAY ELISION `[0,4,,5]` -- an omitted element. Evaluates to undefined |
| 143 | const ND_YIELD: i64 = 48 // `yield [expr]` / `yield* expr` (generators, JS-SOTA phase 1 2026-07-29): |
| 154 | const OP_ADD: i64 = 1 // + |
| 155 | const OP_SUB: i64 = 2 // - |
| 156 | const OP_MUL: i64 = 3 // * |
| 157 | const OP_DIV: i64 = 4 // / |
| 158 | const OP_MOD: i64 = 5 // % |
| 159 | const OP_LT: i64 = 6 // < |
| 160 | const OP_LE: i64 = 7 // <= |
| 161 | const OP_GT: i64 = 8 // > |
| 162 | const OP_GE: i64 = 9 // >= |
| 163 | const OP_EQ: i64 = 10 // == |
| 164 | const OP_NE: i64 = 11 // != |
| 165 | const OP_SEQ: i64 = 12 // === |
| 166 | const OP_SNE: i64 = 13 // !== |
| 167 | const OP_AND: i64 = 14 // && |
| 168 | const OP_OR: i64 = 15 // || |
| 169 | const OP_NOT: i64 = 16 // ! (unary) |
| 170 | const OP_NEG: i64 = 17 // - (unary) |
| 171 | const OP_POS: i64 = 18 // + (unary) |
| 172 | const OP_TYPEOF: i64 = 19 // typeof (unary) |
| 173 | const OP_NULLISH: i64 = 20 // ?? (nullish coalescing, short-circuit) |
| 174 | const OP_BAND: i64 = 21 // & (bitwise AND) |
| 175 | const OP_BOR: i64 = 22 // | (bitwise OR) |
| 176 | const OP_BXOR: i64 = 23 // ^ (bitwise XOR) |
| 177 | const OP_SHL: i64 = 24 // << (left shift) |
| 178 | const OP_SHR: i64 = 25 // >> (signed right shift) |
| 179 | const OP_USHR: i64 = 26 // >>> (unsigned right shift) |
| 180 | const OP_BNOT: i64 = 27 // ~ (unary bitwise NOT) |
| 181 | const OP_INSTANCEOF: i64 = 28 // `a instanceof B` -> true if B.prototype is on a's [[Prototype]] chain |
| 182 | const OP_IN: i64 = 29 // `k in obj` -> true if obj has property k (own or inherited) |
| 183 | const OP_DELETE: i64 = 30 // `delete obj[k]` / `delete obj.k` -> remove property, return true (unary, ref-based) |
| 184 | const OP_VOID: i64 = 31 // `void x` -> evaluate x (side effects) then return undefined (minified `void 0`=undefined) |
| 189 | const NODE_SLOTS: i64 = 6 |
| 196 | const PST_CUR: i64 = 0 |
| 197 | const PST_ERR: i64 = 1 |
| 198 | const PST_NNODE: i64 = 2 |
| 199 | const PST_NCHILD: i64 = 3 |
| 200 | const PST_ERR_POS: i64 = 4 // source byte offset of the FIRST error token (-1 = none); for parser-gap location |
| 209 | const CTX_SRC: i64 = 0 |
| 210 | const CTX_TOKS: i64 = 1 |
| 211 | const CTX_NTOK: i64 = 2 |
| 212 | const CTX_NODES: i64 = 3 |
| 213 | const CTX_CHILDREN: i64 = 4 |
| 214 | const CTX_PST: i64 = 5 |
| 215 | const CTX_MAXNODE: i64 = 6 |
| 216 | const CTX_MAXCHILD: i64 = 7 |
functions
| 219 | func jp_pst(ctx: *i64) -> *i64 { return (ctx[CTX_PST]) as *i64 } |
| 220 | func jp_toks(ctx: *i64) -> *i64 { return (ctx[CTX_TOKS]) as *i64 } |
| 221 | func jp_nodes(ctx: *i64) -> *i64 { return (ctx[CTX_NODES]) as *i64 } |
| 222 | func jp_children(ctx: *i64) -> *i64 { return (ctx[CTX_CHILDREN]) as *i64 } |
| 223 | func jp_src(ctx: *i64) -> *u8 { return (ctx[CTX_SRC]) as *u8 } |
| 225 | func jp_cur(ctx: *i64) -> i64 { let p: *i64 = jp_pst(ctx); return p[PST_CUR] } called by 23: jp_arrow_paren_aheadjp_prev_endjp_newline_beforejp_can_asijp_error_nodejp_parse_object+17 calls 1: jp_pst |
| 226 | func jp_set_cur(ctx: *i64, v: i64) -> i64 { let p: *i64 = jp_pst(ctx); p[PST_CUR] = v; return 0 } |
| 227 | func jp_err(ctx: *i64) -> i64 { let p: *i64 = jp_pst(ctx); return p[PST_ERR] } called by 47: jp_parse_arrayjp_parse_objectjp_parse_newjp_parse_class_decljp_parse_primaryjp_parse_postfix+41 calls 1: jp_pst |
| 228 | func jp_err_pos(ctx: *i64) -> i64 { let p: *i64 = jp_pst(ctx); return p[PST_ERR_POS] } calls 1: jp_pst |
| 229 | func jp_set_err(ctx: *i64) -> i64 { let p: *i64 = jp_pst(ctx); if p[PST_ERR] == 0 { p[PST_ERR_POS] = jp_tok_start(ctx) } p[PST_ERR] = 1; return 0 } called by 16: jp_new_nodejp_error_nodejp_child_pushjp_child_commitjp_parse_arrayjp_parse_object+10 calls 2: jp_pstjp_tok_start |
| 232 | func jp_tok_kind(ctx: *i64) -> i64 called by 29: jp_is_lexjp_can_asijp_parse_objectjp_parse_newjp_parse_class_decljp_parse_primary+23 calls 2: jp_pstjp_toks |
| 239 | func jp_tok_start(ctx: *i64) -> i64 |
| 246 | func jp_tok_len(ctx: *i64) -> i64 |
| 253 | func jp_advance(ctx: *i64) -> i64 called by 45: jp_eat_punctjp_parse_arrayjp_parse_objectjp_parse_newjp_parse_class_decljp_parse_primary+39 calls 1: jp_pst |
| 260 | func jp_is_lex(ctx: *i64, kind: i64, lit: *u8) -> i64 |
| 264 | func jp_is_punct(ctx: *i64, lit: *u8) -> i64 { return jp_is_lex(ctx, JS_TOK_PUNCT, lit) } called by 42: jp_eat_punctjp_can_asijp_parse_arrayjp_parse_objectjp_parse_newjp_parse_class_decl+36 calls 1: jp_is_lex |
| 265 | func jp_is_kw(ctx: *i64, lit: *u8) -> i64 { return jp_is_lex(ctx, JS_TOK_KEYWORD, lit) } called by 11: jp_parse_class_decljp_parse_primaryjp_parse_unaryjp_rel_opjp_parse_ifjp_parse_for+5 calls 1: jp_is_lex |
| 271 | func jp_kind_at(ctx: *i64, i: i64) -> i64 |
| 278 | func jp_punct_at(ctx: *i64, i: i64, lit: *u8) -> i64 |
| 290 | func jp_arrow_paren_ahead(ctx: *i64) -> i64 |
| 314 | func jp_eat_punct(ctx: *i64, lit: *u8) -> i64 |
| 327 | func jp_prev_end(ctx: *i64) -> i64 |
| 338 | func jp_newline_before(ctx: *i64) -> i64 |
| 358 | func jp_can_asi(ctx: *i64) -> i64 |
| 368 | func jp_is_lvalue(ctx: *i64, idx: i64) -> i64 |
| 377 | func jp_new_node(ctx: *i64, nkind: i64, a: i64, b: i64, c: i64, tokidx: i64, extra: i64) -> i64 |
| 392 | func jp_error_node(ctx: *i64) -> i64 |
| 398 | func jp_nkind(ctx: *i64, idx: i64) -> i64 { let n: *i64 = jp_nodes(ctx); return n[idx * NODE_SLOTS + 0] } called by 20: js_evaljs_eval_calljs_bind_patternjs_call_corejs_hoist_bodyjs_eval_args+14 calls 1: jp_nodes |
| 399 | func jp_na(ctx: *i64, idx: i64) -> i64 { let n: *i64 = jp_nodes(ctx); return n[idx * NODE_SLOTS + 1] } called by 21: js_evaljs_eval_calljs_call_userfnjs_bind_patternjs_call_corejs_hoist_body+15 calls 1: jp_nodes |
| 400 | func jp_nb(ctx: *i64, idx: i64) -> i64 { let n: *i64 = jp_nodes(ctx); return n[idx * NODE_SLOTS + 2] } called by 21: js_evaljs_eval_super_methodjs_eval_calljs_bind_patternjs_call_corejs_hoist_body+15 calls 1: jp_nodes |
| 401 | func jp_nc(ctx: *i64, idx: i64) -> i64 { let n: *i64 = jp_nodes(ctx); return n[idx * NODE_SLOTS + 3] } |
| 402 | func jp_nextra(ctx: *i64, idx: i64) -> i64 { let n: *i64 = jp_nodes(ctx); return n[idx * NODE_SLOTS + 5] } |
| 405 | func jp_child_push(ctx: *i64, node_idx: i64) -> i64 |
| 415 | func jp_child_at(ctx: *i64, list_idx: i64, k: i64) -> i64 called by 15: js_evaljs_bind_patternjs_call_corejs_hoist_bodyjq_expr0main+9 calls 2: jp_najp_children |
| 427 | func jp_child_commit(ctx: *i64, scratch: *i64, count: i64) -> i64 |
| 448 | func jp_parse_array(ctx: *i64) -> i64 called by 1: jp_parse_primary calls 9: jp_advancejp_is_punctjp_new_nodejp_parse_assignjp_errjp_eat_punct+3 |
| 493 | func jp_parse_object(ctx: *i64) -> i64 called by 1: jp_parse_primary calls 15: jp_advancejp_is_punctjp_parse_assignjp_new_nodejp_errjp_eat_punct+9 |
| 586 | func jp_parse_new(ctx: *i64) -> i64 called by 1: jp_parse_primary calls 11: jp_advancejp_parse_primaryjp_errjp_error_nodejp_is_punctjp_tok_kind+5 |
| 627 | func jp_parse_class_decl(ctx: *i64) -> i64 |
| 710 | func jp_parse_primary(ctx: *i64) -> i64 called by 2: jp_parse_newjp_parse_postfix calls 14: jp_errjp_error_nodejp_tok_kindjp_curjp_new_nodejp_advance+8 |
| 789 | func jp_parse_postfix(ctx: *i64) -> i64 |
| 866 | func jp_parse_call_tail(ctx: *i64, callee: i64, opt: i64) -> i64 { // opt=1 -> optional call a?.(args) called by 2: jp_parse_newjp_parse_postfix calls 9: jp_advancejp_is_punctjp_child_commitjp_new_nodejp_parse_assignjp_err+3 |
| 909 | func jp_parse_unary(ctx: *i64) -> i64 called by 2: jp_parse_unaryjp_parse_mul calls 15: jp_errjp_error_nodejp_is_kwjp_is_lexjp_kind_atjp_cur+9 |
| 1003 | func jp_mul_op(ctx: *i64) -> i64 |
| 1011 | func jp_add_op(ctx: *i64) -> i64 |
| 1020 | func jp_rel_op(ctx: *i64) -> i64 |
| 1032 | func jp_eq_op(ctx: *i64) -> i64 |
| 1046 | func jp_parse_mul(ctx: *i64) -> i64 |
| 1062 | func jp_parse_add(ctx: *i64) -> i64 |
| 1080 | func jp_parse_shift(ctx: *i64) -> i64 |
| 1099 | func jp_parse_rel(ctx: *i64) -> i64 |
| 1115 | func jp_parse_eq(ctx: *i64) -> i64 |
| 1133 | func jp_parse_bitand(ctx: *i64) -> i64 |
| 1148 | func jp_parse_bitxor(ctx: *i64) -> i64 |
| 1163 | func jp_parse_bitor(ctx: *i64) -> i64 |
| 1178 | func jp_parse_and(ctx: *i64) -> i64 |
| 1193 | func jp_parse_or(ctx: *i64) -> i64 |
| 1213 | func jp_compound_op(ctx: *i64) -> i64 |
| 1237 | func jp_parse_nullish(ctx: *i64) -> i64 |
| 1252 | func jp_parse_ternary(ctx: *i64) -> i64 called by 1: jp_parse_assign calls 8: jp_parse_nullishjp_errjp_is_punctjp_advancejp_parse_assignjp_error_node+2 |
| 1276 | func jp_wrap_block1(ctx: *i64, stmt: i64) -> i64 |
| 1284 | func jp_parse_arrow_params(ctx: *i64) -> i64 { return jp_parse_params(ctx) } |
| 1289 | func jp_parse_arrow_body(ctx: *i64) -> i64 |
| 1298 | func jp_parse_arrow_single(ctx: *i64) -> i64 called by 1: jp_parse_assign calls 8: jp_new_nodejp_curjp_advancejp_child_pushjp_eat_punctjp_error_node+2 |
| 1311 | func jp_parse_arrow_paren(ctx: *i64) -> i64 |
| 1323 | func jp_arrow_ahead(ctx: *i64) -> i64 |
| 1337 | func jp_parse_assign(ctx: *i64) -> i64 |
| 1383 | func jp_parse_expr(ctx: *i64) -> i64 |
| 1409 | func jp_parse_array_pattern(ctx: *i64) -> i64 |
| 1439 | func jp_parse_object_pattern(ctx: *i64) -> i64 |
| 1477 | func jp_parse_one_declarator(ctx: *i64) -> i64 |
| 1495 | func jp_parse_var_decl(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 9: jp_advancejp_parse_one_declaratorjp_errjp_error_nodejp_is_punctjp_eat_punct+3 |
| 1523 | func jp_parse_return(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 9: jp_advancejp_is_punctjp_tok_kindjp_parse_exprjp_errjp_error_node+3 |
| 1543 | func jp_parse_block(ctx: *i64) -> i64 |
| 1568 | func jp_parse_if(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 8: jp_advancejp_eat_punctjp_error_nodejp_parse_exprjp_parse_stmtjp_is_kw+2 |
| 1584 | func jp_parse_while(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 7: jp_advancejp_eat_punctjp_error_nodejp_parse_exprjp_parse_stmtjp_err+1 |
| 1600 | func jp_parse_for(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 11: jp_advancejp_eat_punctjp_error_nodejp_is_punctjp_is_kwjp_parse_for_decl+5 |
| 1650 | func jp_parse_for_decl(ctx: *i64) -> i64 called by 1: jp_parse_for calls 7: jp_advancejp_parse_one_declaratorjp_errjp_error_nodejp_is_punctjp_child_commit+1 |
| 1678 | func jp_parse_for_in_of(ctx: *i64, target: i64, nkind: i64) -> i64 called by 1: jp_parse_for calls 8: jp_advancejp_parse_exprjp_parse_assignjp_errjp_error_nodejp_eat_punct+2 |
| 1698 | func jp_parse_switch(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 12: jp_advancejp_eat_punctjp_error_nodejp_parse_exprjp_errjp_is_punct+6 |
| 1751 | func jp_parse_case_body(ctx: *i64, case_expr: i64) -> i64 |
| 1779 | func jp_parse_dowhile(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 9: jp_advancejp_parse_stmtjp_errjp_error_nodejp_is_kwjp_eat_punct+3 |
| 1799 | func jp_parse_break(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 6: jp_advancejp_tok_kindjp_eat_punctjp_can_asijp_error_nodejp_new_node |
| 1807 | func jp_parse_continue(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 6: jp_advancejp_tok_kindjp_eat_punctjp_can_asijp_error_nodejp_new_node |
| 1817 | func jp_parse_params(ctx: *i64) -> i64 |
| 1866 | func jp_parse_func_decl(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 9: jp_advancejp_is_punctjp_tok_kindjp_error_nodejp_new_nodejp_cur+3 |
| 1885 | func jp_parse_func_expr(ctx: *i64) -> i64 called by 1: jp_parse_primary calls 9: jp_advancejp_is_punctjp_tok_kindjp_new_nodejp_curjp_parse_params+3 |
| 1906 | func jp_parse_expr_stmt(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 6: jp_parse_exprjp_errjp_error_nodejp_eat_punctjp_new_nodejp_can_asi |
| 1919 | func jp_parse_try(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 11: jp_advancejp_is_punctjp_set_errjp_error_nodejp_parse_blockjp_err+5 |
| 1950 | func jp_parse_throw(ctx: *i64) -> i64 called by 1: jp_parse_stmt calls 7: jp_advancejp_parse_exprjp_errjp_error_nodejp_eat_punctjp_can_asi+1 |
| 1959 | func jp_parse_stmt(ctx: *i64) -> i64 |
| 1997 | func jp_parse_program(ctx: *i64) -> i64 called by 1: jp_parse_source calls 6: jp_tok_kindjp_curjp_errjp_parse_stmtjp_child_commitjp_new_node |
| 2019 | func jp_parse_source(src: *u8, srclen: i64, ctx_out: *i64) -> i64 |
| 2078 | func jq_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 2083 | func jq_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 2084 | func jq_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: jq_parse |
| 2089 | func jq_fdn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 2092 | func jq_parse(s: *u8, ctxbox: *i64) -> i64 |
| 2095 | func jq_ctx(ctxbox: *i64) -> *i64 { return (ctxbox[0]) as *i64 } |
| 2096 | func jq_haserr(ctxbox: *i64) -> i64 { let c: *i64 = jq_ctx(ctxbox); let p: *i64 = jp_pst(c); return p[PST_ERR] } |
| 2099 | func jq_expr0(ctxbox: *i64, prog: i64) -> i64 |
| 2105 | func jq_expr0_kind(ctxbox: *i64, prog: i64) -> i64 |
| 2110 | func jq_expr0_op(ctxbox: *i64, prog: i64) -> i64 |
| 2116 | func jq_binop_is(src: *u8, ctxbox: *i64, want: i64) -> i64 |
| 2125 | func jq_unop_is(src: *u8, ctxbox: *i64, want: i64) -> i64 |
| 2133 | func main() -> i64 |