polserver/pol-core/bscript/compiler/ast
Eric Swanson a77ddd028e
New compiler: Add optimized unary expressions (#244)
Adds:
- UnaryOperator: AST node for unary operators -, ++, --, and so forth
- UnaryOperatorOptimizer: optimizes a unary operator with its operand
  - now integer and float negation, and integer inversion
  - later x[y]++ to a single instruction

Also:
- automatically include basic.em, which includes some parameter defaults like -1.

This allows the compiler to generate output for a hello, world script with the exact same .ecl output as the legacy compiler.
2020-08-26 19:24:47 -07:00
..
Argument.cpp New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
Argument.h New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
Expression.cpp Add Expression, Statement, Value AST base classes, and TopLevelStatements (#229) 2020-08-17 22:53:03 -07:00
Expression.h Add Expression, Statement, Value AST base classes, and TopLevelStatements (#229) 2020-08-17 22:53:03 -07:00
FloatValue.cpp Add FloatValue (#233) 2020-08-19 19:43:08 +02:00
FloatValue.h Add FloatValue (#233) 2020-08-19 19:43:08 +02:00
Function.cpp Build AST nodes for module function declarations (#239) 2020-08-23 15:01:39 -07:00
Function.h Build AST nodes for module function declarations (#239) 2020-08-23 15:01:39 -07:00
FunctionCall.cpp New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
FunctionCall.h New compiler: Add AST nodes for function calls. Can compile hello world. (#240) 2020-08-24 01:47:38 -07:00
FunctionParameterDeclaration.cpp Build AST nodes for module function declarations (#239) 2020-08-23 15:01:39 -07:00
FunctionParameterDeclaration.h Build AST nodes for module function declarations (#239) 2020-08-23 15:01:39 -07:00
FunctionParameterList.cpp Build AST nodes for module function declarations (#239) 2020-08-23 15:01:39 -07:00
FunctionParameterList.h Build AST nodes for module function declarations (#239) 2020-08-23 15:01:39 -07:00
Identifier.cpp Compiler rewrite: add global variables (#241) 2020-08-25 00:57:03 -07:00
Identifier.h Compiler rewrite: add global variables (#241) 2020-08-25 00:57:03 -07:00
IntegerValue.cpp New compiler: Add IntegerValue (#243) 2020-08-25 23:27:24 -07:00
IntegerValue.h New compiler: Add IntegerValue (#243) 2020-08-25 23:27:24 -07:00
ModuleFunctionDeclaration.cpp Build AST nodes for module function declarations (#239) 2020-08-23 15:01:39 -07:00
ModuleFunctionDeclaration.h Build AST nodes for module function declarations (#239) 2020-08-23 15:01:39 -07:00
Node.cpp Add ast/Node (#227) 2020-08-17 08:03:33 +02:00
Node.h Add ast/Node (#227) 2020-08-17 08:03:33 +02:00
NodeVisitor.cpp New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
NodeVisitor.h New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
Statement.cpp Add Expression, Statement, Value AST base classes, and TopLevelStatements (#229) 2020-08-17 22:53:03 -07:00
Statement.h Add Expression, Statement, Value AST base classes, and TopLevelStatements (#229) 2020-08-17 22:53:03 -07:00
StringValue.cpp New compiler: Add StringValue (#235) 2020-08-20 10:27:35 +02:00
StringValue.h New compiler: Add StringValue (#235) 2020-08-20 10:27:35 +02:00
TopLevelStatements.cpp Add Expression, Statement, Value AST base classes, and TopLevelStatements (#229) 2020-08-17 22:53:03 -07:00
TopLevelStatements.h Add Expression, Statement, Value AST base classes, and TopLevelStatements (#229) 2020-08-17 22:53:03 -07:00
UnaryOperator.cpp New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
UnaryOperator.h New compiler: Add optimized unary expressions (#244) 2020-08-26 19:24:47 -07:00
Value.cpp Add Expression, Statement, Value AST base classes, and TopLevelStatements (#229) 2020-08-17 22:53:03 -07:00
Value.h Add Expression, Statement, Value AST base classes, and TopLevelStatements (#229) 2020-08-17 22:53:03 -07:00
ValueConsumer.cpp Add SourceFileProcessor, ValueConsumer (#232) 2020-08-18 23:32:57 -07:00
ValueConsumer.h Add SourceFileProcessor, ValueConsumer (#232) 2020-08-18 23:32:57 -07:00
VarStatement.cpp Compiler rewrite: add global variables (#241) 2020-08-25 00:57:03 -07:00
VarStatement.h Compiler rewrite: add global variables (#241) 2020-08-25 00:57:03 -07:00