diff options
Diffstat (limited to 'ASTForward.h')
-rw-r--r-- | ASTForward.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ASTForward.h b/ASTForward.h new file mode 100644 index 00000000..b930a223 --- /dev/null +++ b/ASTForward.h @@ -0,0 +1,53 @@ +#pragma once + +#include <string> +#include <memory> +#include <vector> + +// Forward-declare all AST node types + +namespace dev { +namespace solidity { + +class ASTNode; +class ContractDefinition; +class StructDefinition; +class ParameterList; +class FunctionDefinition; +class VariableDeclaration; +class TypeName; +class ElementaryTypeName; +class UserDefinedTypeName; +class Mapping; +class Statement; +class Block; +class IfStatement; +class BreakableStatement; +class WhileStatement; +class Continue; +class Break; +class Return; +class VariableDefinition; +class Expression; +class Assignment; +class UnaryOperation; +class BinaryOperation; +class FunctionCall; +class MemberAccess; +class IndexAccess; +class PrimaryExpression; +class ElementaryTypeNameExpression; +class Literal; + +// Used as pointers to AST nodes, to be replaced by more clever pointers, e.g. pointers which do +// not do reference counting but point to a special memory area that is completely released +// explicitly. +template <class T> +using ptr = std::shared_ptr<T>; +template <class T> +using vecptr = std::vector<ptr<T>>; + +using ASTString = std::string; + + +} } |