feat: parse function calls

This commit is contained in:
2026-10-02 00:36:57 +02:00
parent 21e459eb96
commit 50a10bb404
6 changed files with 246 additions and 14 deletions
+2
View File
@@ -9,3 +9,5 @@ bro build
```
The parser supports arithmetic expressions with nested parenthesized groups, such as `a + (b - c) * 2 / 3`. Groups control precedence without adding AST nodes; inner expression spans exclude the grouping parentheses.
Function calls are postfix expressions: `f()`, `f(a, b)`, and `factory()(x)`. Calls bind tighter than unary and binary arithmetic and can appear in initializers or as expression statements inside function bodies. Argument lists allow a trailing comma; newlines remain statement boundaries. Name resolution and argument/type checking belong to semantic analysis.