diff options
author | chriseth <c@ethdev.com> | 2016-03-02 05:56:39 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-03-30 08:37:00 +0800 |
commit | f0494307232e52dcc268f5f32d26cc89d7e98e3a (patch) | |
tree | 5a03eae3515eb50d67388e7d7d1193d016baaddf /libsolidity/parsing/Parser.cpp | |
parent | 949b00ed591303c531ed8fa73087b710b7a554de (diff) | |
download | dexon-solidity-f0494307232e52dcc268f5f32d26cc89d7e98e3a.tar.gz dexon-solidity-f0494307232e52dcc268f5f32d26cc89d7e98e3a.tar.zst dexon-solidity-f0494307232e52dcc268f5f32d26cc89d7e98e3a.zip |
Code generation (missing external access and source locations).
Diffstat (limited to 'libsolidity/parsing/Parser.cpp')
-rw-r--r-- | libsolidity/parsing/Parser.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index 29377380..bb50f47f 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -735,16 +735,17 @@ ASTPointer<InlineAssembly> Parser::parseInlineAssembly(ASTPointer<ASTString> con { ASTNodeFactory nodeFactory(*this); expectToken(Token::Assembly); - if (m_scanner->currentToken() != Token::StringLiteral) - fatalParserError("Expected assembly name."); - if (m_scanner->currentLiteral() != "evmasm") - fatalParserError("Only \"evmasm\" supported."); - m_scanner->next(); + if (m_scanner->currentToken() == Token::StringLiteral) + { + if (m_scanner->currentLiteral() != "evmasm") + fatalParserError("Only \"evmasm\" supported."); + m_scanner->next(); + } - InlineAssemblyParser parser(m_errors); - shared_ptr<InlineAssemblyBlock> operations = parser.parse(m_scanner); + assembly::Parser asmParser(m_errors); + shared_ptr<assembly::Block> block = asmParser.parse(m_scanner); nodeFactory.markEndPosition(); - return nodeFactory.createNode<InlineAssembly>(_docString, operations); + return nodeFactory.createNode<InlineAssembly>(_docString, block); } ASTPointer<IfStatement> Parser::parseIfStatement(ASTPointer<ASTString> const& _docString) |