mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Renamed function.
This commit is contained in:
parent
27ba665694
commit
a5696e1f0a
@ -130,7 +130,7 @@ assembly::Statement Parser::parseExpression()
|
|||||||
return operation;
|
return operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<string, dev::solidity::Instruction> Parser::getInstructions()
|
std::map<string, dev::solidity::Instruction> const& Parser::instructions()
|
||||||
{
|
{
|
||||||
// Allowed instructions, lowercase names.
|
// Allowed instructions, lowercase names.
|
||||||
static map<string, dev::solidity::Instruction> s_instructions;
|
static map<string, dev::solidity::Instruction> s_instructions;
|
||||||
@ -156,7 +156,7 @@ std::map<string, dev::solidity::Instruction> Parser::getInstructions()
|
|||||||
|
|
||||||
assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
|
assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
|
||||||
{
|
{
|
||||||
map<string, dev::solidity::Instruction> s_instructions = getInstructions();
|
map<string, dev::solidity::Instruction> const& s_instructions = instructions();
|
||||||
|
|
||||||
Statement ret;
|
Statement ret;
|
||||||
switch (m_scanner->currentToken())
|
switch (m_scanner->currentToken())
|
||||||
@ -178,7 +178,7 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
|
|||||||
// first search the set of instructions.
|
// first search the set of instructions.
|
||||||
if (s_instructions.count(literal))
|
if (s_instructions.count(literal))
|
||||||
{
|
{
|
||||||
dev::solidity::Instruction const& instr = s_instructions[literal];
|
dev::solidity::Instruction const& instr = s_instructions.at(literal);
|
||||||
if (_onlySinglePusher)
|
if (_onlySinglePusher)
|
||||||
{
|
{
|
||||||
InstructionInfo info = dev::solidity::instructionInfo(instr);
|
InstructionInfo info = dev::solidity::instructionInfo(instr);
|
||||||
@ -210,7 +210,7 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
|
|||||||
|
|
||||||
assembly::VariableDeclaration Parser::parseVariableDeclaration()
|
assembly::VariableDeclaration Parser::parseVariableDeclaration()
|
||||||
{
|
{
|
||||||
map<string, dev::solidity::Instruction> s_instructions = getInstructions();
|
map<string, dev::solidity::Instruction> const& s_instructions = instructions();
|
||||||
VariableDeclaration varDecl = createWithLocation<VariableDeclaration>();
|
VariableDeclaration varDecl = createWithLocation<VariableDeclaration>();
|
||||||
expectToken(Token::Let);
|
expectToken(Token::Let);
|
||||||
varDecl.name = m_scanner->currentLiteral();
|
varDecl.name = m_scanner->currentLiteral();
|
||||||
|
@ -64,7 +64,7 @@ protected:
|
|||||||
Statement parseStatement();
|
Statement parseStatement();
|
||||||
/// Parses a functional expression that has to push exactly one stack element
|
/// Parses a functional expression that has to push exactly one stack element
|
||||||
Statement parseExpression();
|
Statement parseExpression();
|
||||||
std::map<std::string, dev::solidity::Instruction> getInstructions();
|
std::map<std::string, dev::solidity::Instruction> const& instructions();
|
||||||
Statement parseElementaryOperation(bool _onlySinglePusher = false);
|
Statement parseElementaryOperation(bool _onlySinglePusher = false);
|
||||||
VariableDeclaration parseVariableDeclaration();
|
VariableDeclaration parseVariableDeclaration();
|
||||||
FunctionalInstruction parseFunctionalInstruction(Statement&& _instruction);
|
FunctionalInstruction parseFunctionalInstruction(Statement&& _instruction);
|
||||||
|
Loading…
Reference in New Issue
Block a user