Commit graph

3 commits

Author SHA1 Message Date
turleypol
cccf84dfc8
Fewer compile warnings (#413)
* added escriptgrammar as external lib where it belongs. Silenced warnings.

* bscript compiler warning fixes

* special include file to get rid of gcc warnings about antlr4

* misc windows warnings

* time specifc warnings

* buildfix + apple warnings

* never trust apple

* windows debug build warnings

* some windows clang warnings

* last warning fix
2021-08-28 22:26:15 +02:00
Kevin Eady
0cd9412066
Properly scope the compiler includes to the Bscript folder. (#360) 2021-02-25 16:53:22 +01:00
Eric Swanson
f3202547fb
New compiler: Add support for case statements (#272)
Adds:
- ast/CaseDispatchDefaultSelector: AST node for a "default:" selector
- ast/CaseDispatchGroup: AST node for a collection of selectors and the code to execute
- ast/CaseDispatchGroups: AST node holding all groups in a case statement
- ast/CaseDispatchSelectors: AST node holding all selectors for one group
- ast/CaseStatement: AST node for a whole case statement
- codegen/CaseDispatchGroupVisitor: knows what to put in a case jump dispatch table
- codegen/CaseJumpDataBlock: knows how to build the entries in the data block

Also, detect multiple case selectors with the same value (or default).  This is different from the OG compiler, which only detected duplicate `default:` selectors.
2020-09-05 20:41:58 -07:00