Commit graph

2 commits

Author SHA1 Message Date
Kevin Eady
a953a37fa7 Support function reference calls with default parameters (#710)
* Support default args in funcref calls
- Simplify BFunctionRef by using funcref index
- Emit default args when visiting function reference

* Move default args gen to second-pass visit

* Better error message on param count errors

* Check for constructor in MTH_NEW

* Address self-review comments
- Update code comments

* Introduce ResourceManager to pol testsuite
- Create a new class-based resource manager for deleting resources
(item NPCs, multis) after each test.
- Migrate house_set_multiid test to use new ResourceManager.

* Move resource cleanup
2024-10-10 18:06:04 +02:00
Eric Swanson
95e604e417
Add support for if-then-else statements (#259)
Adds:
- ast/Block: a block scope that allows declaring local variables
- ast/IfThenElseStatement: AST node for if..elseif..else..endif statements
- model/FlowControlLabel: provides an anchor for jumps or calls.
  - Function calls, break statements, continue statements, and loops will all use these.
2020-08-30 17:03:26 -07:00