Commit graph

4 commits

Author SHA1 Message Date
Kevin Eady
0cd9412066
Properly scope the compiler includes to the Bscript folder. (#360) 2021-02-25 16:53:22 +01:00
Eric Swanson
e6d9f78f2a
Disallow var names that match an unreferenced function. (#300)
Remember known user function names when they are declared, rather than when they are referenced.
2020-09-11 01:16:24 -07:00
Eric Swanson
7598c9486f
Disallow function names as variable, argument, and const names (#298) 2020-09-11 00:16:20 -07:00
Eric Swanson
b3bd302785
Add limited support for user functions (#262)
Adds:
- ast/UserFunction AST node for user-defined functions.
- astbuilder/AvailableUserFunction: reference to a parse tree for a user function.
  - The AST builder only generates ASTs for user functions that are actually referenced.
- astbuilder/UserFunctionVisitor: visits (builds an AST for) a parse tree for a user function.
  - This happens after the .src or .inc file has been otherwise processed, so this class serves to hook up the correct SourceFileIdentifier to the AST.
2020-08-31 18:46:27 -07:00