Commit Graph

9 Commits

Author SHA1 Message Date
Stefano Sanfilippo b2e7a11b7a Introducing boost::ptr_vector and boost::ptr_unordered_set.
This is an easy way to increase the uniformity of the API.
2015-03-08 21:03:23 +01:00
Stefano Sanfilippo f933cc3163 Extracting a FunctionPrototype node.
This will allow more flexibility in defining externed functions.
2015-03-08 11:25:41 +01:00
Stefano Sanfilippo bb675a09d7 Adding Type::UNKNOWN 2015-03-07 14:03:07 +01:00
Stefano Sanfilippo b7be4dc37f Implementing error handling in emitters.
As a result, Emitter iface changes by providing a bool retval.
False means failure and should be managed as such.
2015-03-06 14:29:52 +01:00
Stefano Sanfilippo 5d043566dc Turn main into an ordinary function. 2015-03-06 13:40:40 +01:00
Stefano Sanfilippo 248afa02c8 Further simplification of the AST hieararchy and Emitter iface. 2015-03-05 22:28:45 +01:00
Stefano Sanfilippo d7494702af Simplify the Expression hierarchy by moving the operator on the binary father.
As a consequence, the Emitter interface is greatly simplified.
2015-03-05 17:25:02 +01:00
Stefano Sanfilippo 25153e8a85 Properly indent generated C++ code. 2015-03-05 13:55:34 +01:00
Stefano Sanfilippo b0a01d2fb7 Decouple AST nodes from representation.
1. adding getters to all node properties.
2. extracting an Emitter interface.
3. moving all C++ codegen features to a CppEmitter.

All list template specializations typedefs have been removed for
increased readability.

A dependency on Boost is introduced for boost::optional,
which is required in the AST getters API.
2015-03-05 01:16:40 +01:00