Files
j-lang/projects/custom_fn.j
Jose Luis Montañes Ojados f2e90efc16 Add user-defined functions with call frames
Implement fn/return across the full pipeline:
- Lexer: TOK_FN, TOK_RETURN keywords
- Parser: NODE_FN_DEF, NODE_RETURN AST nodes
- Compiler: FunctionEntry table, inline compilation with jump-over and backpatching
- VM: CallFrame stack with variable snapshot for scoped calls and OP_RETURN
2026-02-18 03:16:54 +01:00

4 lines
61 B
Plaintext

fn greet(name):
println("Hola, " + name)
greet("mundo!")