mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Remove useless helper expectAssignmentOperator in parser
This commit is contained in:
		
							parent
							
								
									5738f93704
								
							
						
					
					
						commit
						73c99d15cd
					
				| @ -1194,7 +1194,8 @@ ASTPointer<Expression> Parser::parseExpression( | ||||
| 	ASTPointer<Expression> expression = parseBinaryExpression(4, _lookAheadIndexAccessStructure); | ||||
| 	if (Token::isAssignmentOp(m_scanner->currentToken())) | ||||
| 	{ | ||||
| 		Token::Value assignmentOperator = expectAssignmentOperator(); | ||||
| 		Token::Value assignmentOperator = m_scanner->currentToken(); | ||||
| 		m_scanner->next(); | ||||
| 		ASTPointer<Expression> rightHandSide = parseExpression(); | ||||
| 		ASTNodeFactory nodeFactory(*this, expression); | ||||
| 		nodeFactory.setEndPositionFromNode(rightHandSide); | ||||
| @ -1613,19 +1614,6 @@ string Parser::currentTokenName() | ||||
| 		return Token::name(token); | ||||
| } | ||||
| 
 | ||||
| Token::Value Parser::expectAssignmentOperator() | ||||
| { | ||||
| 	Token::Value op = m_scanner->currentToken(); | ||||
| 	if (!Token::isAssignmentOp(op)) | ||||
| 		fatalParserError( | ||||
| 			string("Expected assignment operator,  got '") + | ||||
| 			currentTokenName() + | ||||
| 			string("'") | ||||
| 		); | ||||
| 	m_scanner->next(); | ||||
| 	return op; | ||||
| } | ||||
| 
 | ||||
| ASTPointer<ASTString> Parser::expectIdentifierToken() | ||||
| { | ||||
| 	Token::Value id = m_scanner->currentToken(); | ||||
|  | ||||
| @ -166,7 +166,6 @@ private: | ||||
| 	ASTPointer<Expression> expressionFromIndexAccessStructure(IndexAccessedPath const& _pathAndIndices); | ||||
| 
 | ||||
| 	std::string currentTokenName(); | ||||
| 	Token::Value expectAssignmentOperator(); | ||||
| 	ASTPointer<ASTString> expectIdentifierToken(); | ||||
| 	ASTPointer<ASTString> getLiteralAndAdvance(); | ||||
| 	///@}
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user