Commit Graph

3 Commits

Author SHA1 Message Date
Jose Luis Montañes Ojados
2c91cbb561 Add // line comments, grouped parentheses, and NODE_NOP
- Parse // comments in parse_statement by consuming tokens until newline
- Add NODE_NOP for no-op statements (comments)
- Support grouped expressions with parentheses in parse_term
2026-02-16 22:41:52 +01:00
Jose Luis Montañes Ojados
21efb0563b Allow function calls in expressions and add len() built-in
- Parse function calls in parse_term() so they work inside expressions
  (e.g. z = len(x), y = len(x) + 1)
- Add len() built-in for string length in evaluator
2026-02-16 18:31:39 +01:00
Jose Luis Montañes Ojados
a36e52a9c3 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
2026-02-16 18:14:39 +01:00