Replace print/println keywords with generic function call mechanism

- Add NODE_CALL with name, args, and arg_count to parser
- Add TOK_COMMA token and tokenize (, ), , in lexer
- Remove TOK_PRINT/TOK_PRINTLN keywords; print/println are now regular
  identifiers resolved as built-in functions in the evaluator
- Add NODE_CALL debug output in ast_print
This commit is contained in:
Jose Luis Montañes Ojados
2026-02-16 18:14:39 +01:00
parent dd67537598
commit a36e52a9c3
4 changed files with 97 additions and 37 deletions

11
projects/functions.j Normal file
View File

@@ -0,0 +1,11 @@
x = "Hello world!"
y = 21
println()
println(x)
print("y=")
println(y)
dummy()
if y > 1:
println("OK!")