diff options
author | Christian <c@ethdev.com> | 2014-12-06 08:06:24 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2014-12-08 19:49:03 +0800 |
commit | c78c330634997e5d8e2ec27db9e3d9cf50bae230 (patch) | |
tree | b47e89a21d6686ca49478528ace3e239836dbb0e /ExpressionCompiler.h | |
parent | 41b8d7b7f1221c6caae142a6833228ccd098ef5b (diff) | |
download | dexon-solidity-c78c330634997e5d8e2ec27db9e3d9cf50bae230.tar.gz dexon-solidity-c78c330634997e5d8e2ec27db9e3d9cf50bae230.tar.zst dexon-solidity-c78c330634997e5d8e2ec27db9e3d9cf50bae230.zip |
Const AST visitor for the compiler.
Diffstat (limited to 'ExpressionCompiler.h')
-rw-r--r-- | ExpressionCompiler.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ExpressionCompiler.h b/ExpressionCompiler.h index 83d7cdc6..5d4eec37 100644 --- a/ExpressionCompiler.h +++ b/ExpressionCompiler.h @@ -44,7 +44,7 @@ class ExpressionCompiler: private ASTVisitor { public: /// Compile the given @a _expression into the @a _context. - static void compileExpression(CompilerContext& _context, Expression& _expression); + static void compileExpression(CompilerContext& _context, Expression const& _expression); /// Appends code to remove dirty higher order bits in case of an implicit promotion to a wider type. static void appendTypeConversion(CompilerContext& _context, Type const& _typeOnStack, Type const& _targetType); @@ -53,18 +53,18 @@ private: ExpressionCompiler(CompilerContext& _compilerContext): m_context(_compilerContext), m_currentLValue(m_context) {} - virtual bool visit(Assignment& _assignment) override; - virtual void endVisit(UnaryOperation& _unaryOperation) override; - virtual bool visit(BinaryOperation& _binaryOperation) override; - virtual bool visit(FunctionCall& _functionCall) override; - virtual void endVisit(MemberAccess& _memberAccess) override; - virtual bool visit(IndexAccess& _indexAccess) override; - virtual void endVisit(Identifier& _identifier) override; - virtual void endVisit(Literal& _literal) override; + virtual bool visit(Assignment const& _assignment) override; + virtual void endVisit(UnaryOperation const& _unaryOperation) override; + virtual bool visit(BinaryOperation const& _binaryOperation) override; + virtual bool visit(FunctionCall const& _functionCall) override; + virtual void endVisit(MemberAccess const& _memberAccess) override; + virtual bool visit(IndexAccess const& _indexAccess) override; + virtual void endVisit(Identifier const& _identifier) override; + virtual void endVisit(Literal const& _literal) override; ///@{ ///@name Append code for various operator types - void appendAndOrOperatorCode(BinaryOperation& _binaryOperation); + void appendAndOrOperatorCode(BinaryOperation const& _binaryOperation); void appendCompareOperatorCode(Token::Value _operator, Type const& _type); void appendOrdinaryBinaryOperatorCode(Token::Value _operator, Type const& _type); |