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.
Adds enough to build the AST nodes for the module function declarations in a .em file.
Adds:
- Function: base class for module function declarations and user functions
- FunctionParameterDeclaration: declaration for a function parameter, as well as its default value if any
- FunctionParameterList: just a holder for function parameter declarations
- ModuleFunctionDeclaration: for function declarations in .em files
- FunctionResolver: hooks up function calls to module functions or user functions
- ModuleProcessor: a visitor for processing const declarations and module function declarations (const declarations are yet to come from the main branch)
The Disambiguator will correct the AST based on context.
At present, it needs to handle ambiguities in the grammar between
case group selectors and named break/continue labels.
Add astbuilder/BuilderWorkspace:
- Temporary workspace used while building the AST (which goes in the CompilerWorkspace)
Add astbuilder/CompilerWorkspaceBuilder:
- Builds a CompilerWorkspace for a script
Add model/CompilerWorkspace:
- Holds AST
- Holds some intermediate data used by semantic analyzer, optimizer, code generator
* Add compiler/Profile
* Add compiler/Report
* From CR notes: add newline on caught exception.
Also added comments that messages should have a newline at the end.
* use c++14 on linux, visual studio still undefined which means highest
available
* removed make_unique.h due to c++14 no more needed
* stumbled across pre c++14 code
* Removed use of boost::make_unique<> (updated to C++14)
Co-authored-by: turleypol <turley@polserver.com>
* Add -G / CompareCompilerOutput ecompile mode that runs old and new compiler and compares output.
Add LegacyFunctionOrder because parity needs to know how the old compiler ordered functions.
* Fix class/struct mixup, add to cmake sources
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!