mcode->mach

This commit is contained in:
2026-02-12 04:28:14 -06:00
parent 8a84be65e1
commit 3a8a17ab60
19 changed files with 635 additions and 4320 deletions

View File

@@ -65,7 +65,7 @@ var parse = function(tokens, src, filename, tokenizer) {
var errors = []
var error_count = 0
var function_nr = 1
var fn_counter = 1
var ast_node = function(kind, token) {
return {
@@ -422,8 +422,8 @@ var parse = function(tokens, src, filename, tokenizer) {
_control_depth = meth_old_cd
_control_type = meth_old_ct
_expecting_body = meth_old_eb
fn.function_nr = function_nr
function_nr = function_nr + 1
fn.function_nr = fn_counter
fn_counter = fn_counter + 1
ast_node_end(fn)
pair.right = fn
} else if (is_ident && (tok.kind == "," || tok.kind == "}")) {
@@ -918,8 +918,8 @@ var parse = function(tokens, src, filename, tokenizer) {
_control_depth = old_cd
_control_type = old_ct
_expecting_body = old_eb
node.function_nr = function_nr
function_nr = function_nr + 1
node.function_nr = fn_counter
fn_counter = fn_counter + 1
ast_node_end(node)
return node
}
@@ -1008,8 +1008,8 @@ var parse = function(tokens, src, filename, tokenizer) {
_control_depth = old_cd
_control_type = old_ct
_expecting_body = old_eb
node.function_nr = function_nr
function_nr = function_nr + 1
node.function_nr = fn_counter
fn_counter = fn_counter + 1
ast_node_end(node)
return node
}