aboutsummaryrefslogtreecommitdiffstats
path: root/Parser.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-20 20:00:37 +0800
committerChristian <c@ethdev.com>2014-10-20 22:23:49 +0800
commitbe885dc3cf3da61278a22493b6c7510c6121e0a9 (patch)
tree1e602ffa535b058692d480fe1942a2139dcc6bbb /Parser.h
parentf0c334670dfef7c1b1d1ae610cf19ae9ad2822ca (diff)
downloaddexon-solidity-be885dc3cf3da61278a22493b6c7510c6121e0a9.tar.gz
dexon-solidity-be885dc3cf3da61278a22493b6c7510c6121e0a9.tar.zst
dexon-solidity-be885dc3cf3da61278a22493b6c7510c6121e0a9.zip
Pointer type cleanup: Use ASTPointer only for AST nodes and shared_ptr for type
pointer.
Diffstat (limited to 'Parser.h')
-rw-r--r--Parser.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/Parser.h b/Parser.h
index 2a861321..7cc41513 100644
--- a/Parser.h
+++ b/Parser.h
@@ -34,7 +34,7 @@ class Scanner;
class Parser
{
public:
- ptr<ContractDefinition> parse(std::shared_ptr<Scanner> const& _scanner);
+ ASTPointer<ContractDefinition> parse(std::shared_ptr<Scanner> const& _scanner);
private:
class ASTNodeFactory;
@@ -46,24 +46,24 @@ private:
/// Parsing functions for the AST nodes
/// @{
- ptr<ContractDefinition> parseContractDefinition();
- ptr<FunctionDefinition> parseFunctionDefinition(bool _isPublic);
- ptr<StructDefinition> parseStructDefinition();
- ptr<VariableDeclaration> parseVariableDeclaration(bool _allowVar);
- ptr<TypeName> parseTypeName(bool _allowVar);
- ptr<Mapping> parseMapping();
- ptr<ParameterList> parseParameterList(bool _allowEmpty = true);
- ptr<Block> parseBlock();
- ptr<Statement> parseStatement();
- ptr<IfStatement> parseIfStatement();
- ptr<WhileStatement> parseWhileStatement();
- ptr<VariableDefinition> parseVariableDefinition();
- ptr<Expression> parseExpression();
- ptr<Expression> parseBinaryExpression(int _minPrecedence = 4);
- ptr<Expression> parseUnaryExpression();
- ptr<Expression> parseLeftHandSideExpression();
- ptr<Expression> parsePrimaryExpression();
- std::vector<ptr<Expression>> parseFunctionCallArguments();
+ ASTPointer<ContractDefinition> parseContractDefinition();
+ ASTPointer<FunctionDefinition> parseFunctionDefinition(bool _isPublic);
+ ASTPointer<StructDefinition> parseStructDefinition();
+ ASTPointer<VariableDeclaration> parseVariableDeclaration(bool _allowVar);
+ ASTPointer<TypeName> parseTypeName(bool _allowVar);
+ ASTPointer<Mapping> parseMapping();
+ ASTPointer<ParameterList> parseParameterList(bool _allowEmpty = true);
+ ASTPointer<Block> parseBlock();
+ ASTPointer<Statement> parseStatement();
+ ASTPointer<IfStatement> parseIfStatement();
+ ASTPointer<WhileStatement> parseWhileStatement();
+ ASTPointer<VariableDefinition> parseVariableDefinition();
+ ASTPointer<Expression> parseExpression();
+ ASTPointer<Expression> parseBinaryExpression(int _minPrecedence = 4);
+ ASTPointer<Expression> parseUnaryExpression();
+ ASTPointer<Expression> parseLeftHandSideExpression();
+ ASTPointer<Expression> parsePrimaryExpression();
+ std::vector<ASTPointer<Expression>> parseFunctionCallArguments();
/// @}
/// Helper functions
@@ -71,8 +71,8 @@ private:
/// If current token value is not _value, throw exception otherwise advance token.
void expectToken(Token::Value _value);
Token::Value expectAssignmentOperator();
- ptr<ASTString> expectIdentifierToken();
- ptr<ASTString> getLiteralAndAdvance();
+ ASTPointer<ASTString> expectIdentifierToken();
+ ASTPointer<ASTString> getLiteralAndAdvance();
void throwExpectationError(std::string const& _description);
/// @}