mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rename Arrow to DoubleArrow
This commit is contained in:
parent
4e5b403c37
commit
662f7d8fac
@ -433,7 +433,7 @@ variableDeclarationTuple:
|
||||
variableDeclarationStatement: ((variableDeclaration (Assign expression)?) | (variableDeclarationTuple Assign expression)) Semicolon;
|
||||
expressionStatement: expression Semicolon;
|
||||
|
||||
mappingType: Mapping LParen key=mappingKeyType Arrow value=typeName RParen;
|
||||
mappingType: Mapping LParen key=mappingKeyType DoubleArrow value=typeName RParen;
|
||||
/**
|
||||
* Only elementary types or user defined types are viable as mapping keys.
|
||||
*/
|
||||
|
@ -111,7 +111,7 @@ Colon: ':';
|
||||
Semicolon: ';';
|
||||
Period: '.';
|
||||
Conditional: '?';
|
||||
Arrow: '=>';
|
||||
DoubleArrow: '=>';
|
||||
RightArrow: '->';
|
||||
|
||||
Assign: '=';
|
||||
|
@ -540,7 +540,7 @@ void Scanner::scanToken()
|
||||
if (m_char == '=')
|
||||
token = selectToken(Token::Equal);
|
||||
else if (m_char == '>')
|
||||
token = selectToken(Token::Arrow);
|
||||
token = selectToken(Token::DoubleArrow);
|
||||
else
|
||||
token = Token::Assign;
|
||||
break;
|
||||
|
@ -83,7 +83,7 @@ namespace solidity::langutil
|
||||
T(Semicolon, ";", 0) \
|
||||
T(Period, ".", 0) \
|
||||
T(Conditional, "?", 3) \
|
||||
T(Arrow, "=>", 0) \
|
||||
T(DoubleArrow, "=>", 0) \
|
||||
T(RightArrow, "->", 0) \
|
||||
\
|
||||
/* Assignment operators. */ \
|
||||
|
@ -1050,7 +1050,7 @@ ASTPointer<Mapping> Parser::parseMapping()
|
||||
}
|
||||
else
|
||||
fatalParserError(1005_error, "Expected elementary type name or identifier for mapping key type");
|
||||
expectToken(Token::Arrow);
|
||||
expectToken(Token::DoubleArrow);
|
||||
ASTPointer<TypeName> valueType = parseTypeName();
|
||||
nodeFactory.markEndPosition();
|
||||
expectToken(Token::RParen);
|
||||
|
@ -406,7 +406,7 @@ BOOST_AUTO_TEST_CASE(ambiguities)
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::AssignAdd);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::Identifier);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::Inc);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::Arrow);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::DoubleArrow);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::SHL);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::SAR);
|
||||
BOOST_CHECK_EQUAL(scanner.next(), Token::AssignSar);
|
||||
|
Loading…
Reference in New Issue
Block a user