diff options
author | Christian <c@ethdev.com> | 2014-10-10 22:37:54 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-10-10 22:47:21 +0800 |
commit | 98bdd7429974521946a1aa3bffa038fc515f745c (patch) | |
tree | 12736aca5ed657e6aebff050b7d663ed0da3df71 /ASTForward.h | |
parent | 924f7c62bdcb203f42514d298f15570ff53d2bac (diff) | |
download | dexon-solidity-98bdd7429974521946a1aa3bffa038fc515f745c.tar.gz dexon-solidity-98bdd7429974521946a1aa3bffa038fc515f745c.tar.zst dexon-solidity-98bdd7429974521946a1aa3bffa038fc515f745c.zip |
AST printer and command line tool, some fixes.
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; + + +} } |