diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-04 23:37:54 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-02-05 00:52:28 +0800 |
commit | dca5f7b57bb5b535930d437c806f48a25cf6b569 (patch) | |
tree | 04ee06c48c7ca6c4f012c6778bb9ea01248582d9 /Parser.cpp | |
parent | db263bd9d751f69f9d8d9484ff916d38b86c68c4 (diff) | |
download | dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.tar dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.tar.gz dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.tar.bz2 dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.tar.lz dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.tar.xz dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.tar.zst dexon-solidity-dca5f7b57bb5b535930d437c806f48a25cf6b569.zip |
Adding ether subdenominations after constan literals
Diffstat (limited to 'Parser.cpp')
-rw-r--r-- | Parser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -180,7 +180,7 @@ ASTPointer<InheritanceSpecifier> Parser::parseInheritanceSpecifier() Declaration::Visibility Parser::parseVisibilitySpecifier(Token::Value _token) { - Declaration::Visibility visibility; + Declaration::Visibility visibility = Declaration::Visibility::DEFAULT; if (_token == Token::PUBLIC) visibility = Declaration::Visibility::PUBLIC; else if (_token == Token::PROTECTED) @@ -684,6 +684,7 @@ ASTPointer<Expression> Parser::parsePrimaryExpression() ASTNodeFactory nodeFactory(*this); Token::Value token = m_scanner->getCurrentToken(); ASTPointer<Expression> expression; + Token::Value nextToken = Token::ILLEGAL; switch (token) { case Token::TRUE_LITERAL: @@ -691,9 +692,10 @@ ASTPointer<Expression> Parser::parsePrimaryExpression() expression = nodeFactory.createNode<Literal>(token, getLiteralAndAdvance()); break; case Token::NUMBER: + nextToken = m_scanner->peekNextToken(); case Token::STRING_LITERAL: nodeFactory.markEndPosition(); - expression = nodeFactory.createNode<Literal>(token, getLiteralAndAdvance()); + expression = nodeFactory.createNode<Literal>(token, getLiteralAndAdvance(), nextToken); break; case Token::IDENTIFIER: nodeFactory.markEndPosition(); |