Skip to content

Conversation

vrancurel
Copy link

The key changes are:

  • Interpreter:
    • Added a new NodeFunctionCall AST node to represent a function call.
    • The interpreter can now execute functions passed in the variables map. It supports functions with 0 to 3 parameters of type any.
    • Implemented short-circuiting for AND and OR logical operators.
  • Parser:
    • The parser now recognizes function call syntax (identifier(...)).
    • It can parse comma-separated arguments in function calls.
  • Lexer:
    • Added a TokenComma to tokenize function argument lists.
  • Conversions:
    • Type conversion functions now handle func() types, allowing for lazy evaluation of values.
  • Testing:
    • Added a comprehensive test suite for the new function call functionality.

The key changes are:

- Interpreter:
  - Added a new `NodeFunctionCall` AST node to represent a function call.
  - The interpreter can now execute functions passed in the variables map. It supports
    functions with 0 to 3 parameters of type `any`.
  - Implemented short-circuiting for `AND` and `OR` logical operators.
- Parser:
  - The parser now recognizes function call syntax (`identifier(...)`).
  - It can parse comma-separated arguments in function calls.
- Lexer:
  - Added a `TokenComma` to tokenize function argument lists.
- Conversions:
  - Type conversion functions now handle `func()` types, allowing for lazy evaluation
    of values.
- Testing:
  - Added a comprehensive test suite for the new function call functionality.
@vrancurel vrancurel force-pushed the vrancurel/first_class_function_support branch from c2b04d0 to fd5b4ca Compare July 18, 2025 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant