Sven Eberhardt
ebda8193ef
Replace NULL by nullptr in C++ sources
...
We don't support pre-C++0x any more, so nullptr should be fine everywhere (except in the plain C source files)
2016-11-02 19:58:02 -04:00
Nicolas Hake
e2fd7095c1
Merge branch 'ast'
...
# Conflicts:
# src/C4Include.h
# src/script/C4AulCompiler.cpp
# src/script/C4AulParse.cpp
# src/script/C4AulParse.h
# src/script/C4ScriptHost.cpp
# src/script/C4ScriptHost.h
# tests/CMakeLists.txt
2016-10-20 17:33:02 +02:00
Nicolas Hake
266feeda4d
Aul: Add AST generation tests
...
Just making sure the parser creates the AST the way we expect before we
hand off the code to the codegen.
2016-10-20 17:20:55 +02:00
Nicolas Hake
021a6e89f5
Implement direct execution of whole function definitions
...
This implements the changes made in c6e4bfd
on the AST-based parser.
2016-10-19 14:20:47 +02:00
Sven Eberhardt
a7aa89f168
Merge branch 'master' into qteditor
...
Conflicts:
planet/Objects.ocd/Structures.ocd/StoneDoor.ocd/SpinWheel.ocd/Script.c
src/platform/C4WindowSDL.cpp
src/script/C4AulParse.cpp
src/script/C4Effect.cpp
2016-06-20 22:27:03 -04:00
Nicolas Hake
092a23c2f7
Aul: Parse scripts into an AST, then generate bytecode from that
...
This commit contains a fairly substantial rewrite of the C4Script code
generator. Instead of generating bytecode while parsing the script,
we're now parsing the script into a syntax tree, and have any further
processing happen on that instead of the raw source.
At this time, the code generator emits the same bytecode as the old
parser; there are several optimization opportunities that arise from the
new possibility to emit code out of order from its specification by the
author.
Compared to the old compiler, this one is still rather deficient when
dealing with incorrect code; it's also not emitting several warnings
that used to be diagnosed.
2016-05-12 19:43:48 +02:00
Nicolas Hake
7a135a060f
C4AulParse: Take GetTokenName out of public interface
2016-05-09 12:21:33 +02:00
Nicolas Hake
0a3b31e735
C4AulParse::AddVarAccess: Move to C4AulCompiler
2016-05-09 12:21:33 +02:00
Nicolas Hake
792e12adad
C4AulCompiler: Split into separate file
2016-05-09 12:21:33 +02:00
Nicolas Hake
c8d71d47c0
C4CodeGen: Rename to C4AulCompiler
...
I need to split up C4CodeGen into smaller parts, and having the bit that
actually generates the bytecode named C4CodeGenCodeGen would be silly.
2016-05-09 12:21:33 +02:00
Günther Brammer
b8f2d0ca87
Script: Repeat the parser error message when executing a broken function
2016-05-01 00:28:37 +02:00
Günther Brammer
4092911349
Move code generation into its own class
2016-04-28 03:25:47 +02:00
Günther Brammer
b00b8554ab
Merge branch script
2016-04-28 03:25:44 +02:00
Nicolas Hake
cfdb1142b8
Move C4AulParse declaration into separate header
2016-04-24 14:01:23 +02:00