mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rename parseElementaryOperation to parseLiteralOrIdentifier
This commit is contained in:
parent
3da2b67b67
commit
75e0057388
@ -138,11 +138,11 @@ Statement Parser::parseStatement()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Options left:
|
||||
// Simple instruction (might turn into functional),
|
||||
// literal,
|
||||
// identifier (might turn into label or functional assignment)
|
||||
ElementaryOperation elementary(parseElementaryOperation());
|
||||
// Expression/FunctionCall
|
||||
// Assignment
|
||||
ElementaryOperation elementary(parseLiteralOrIdentifier());
|
||||
|
||||
switch (currentToken())
|
||||
{
|
||||
@ -184,7 +184,7 @@ Statement Parser::parseStatement()
|
||||
|
||||
expectToken(Token::Comma);
|
||||
|
||||
elementary = parseElementaryOperation();
|
||||
elementary = parseLiteralOrIdentifier();
|
||||
}
|
||||
|
||||
expectToken(Token::AssemblyAssign);
|
||||
@ -225,7 +225,7 @@ Case Parser::parseCase()
|
||||
else if (currentToken() == Token::Case)
|
||||
{
|
||||
advance();
|
||||
ElementaryOperation literal = parseElementaryOperation();
|
||||
ElementaryOperation literal = parseLiteralOrIdentifier();
|
||||
if (!holds_alternative<Literal>(literal))
|
||||
fatalParserError(4805_error, "Literal expected.");
|
||||
_case.value = make_unique<Literal>(std::get<Literal>(std::move(literal)));
|
||||
@ -264,7 +264,7 @@ Expression Parser::parseExpression()
|
||||
{
|
||||
RecursionGuard recursionGuard(*this);
|
||||
|
||||
ElementaryOperation operation = parseElementaryOperation();
|
||||
ElementaryOperation operation = parseLiteralOrIdentifier();
|
||||
if (holds_alternative<Identifier>(operation))
|
||||
{
|
||||
if (currentToken() == Token::LParen)
|
||||
@ -278,7 +278,7 @@ Expression Parser::parseExpression()
|
||||
}
|
||||
}
|
||||
|
||||
Parser::ElementaryOperation Parser::parseElementaryOperation()
|
||||
Parser::ElementaryOperation Parser::parseLiteralOrIdentifier()
|
||||
{
|
||||
RecursionGuard recursionGuard(*this);
|
||||
ElementaryOperation ret;
|
||||
|
@ -84,7 +84,7 @@ protected:
|
||||
Expression parseExpression();
|
||||
/// Parses an elementary operation, i.e. a literal, identifier, instruction or
|
||||
/// builtin functian call (only the name).
|
||||
ElementaryOperation parseElementaryOperation();
|
||||
ElementaryOperation parseLiteralOrIdentifier();
|
||||
VariableDeclaration parseVariableDeclaration();
|
||||
FunctionDefinition parseFunctionDefinition();
|
||||
Expression parseCall(ElementaryOperation&& _initialOp);
|
||||
|
Loading…
Reference in New Issue
Block a user