aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2016-10-06 21:32:11 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2016-10-11 19:28:49 +0800
commitd0791fb365bd90c8d4b4f3ba6f83b126087d9a8e (patch)
tree111ba9c56a3a01bde39447837da8423019f9fce3 /libsolidity
parentd3f410d8a89aaa042ff264d7a0ea79184e01abab (diff)
downloaddexon-solidity-d0791fb365bd90c8d4b4f3ba6f83b126087d9a8e.tar
dexon-solidity-d0791fb365bd90c8d4b4f3ba6f83b126087d9a8e.tar.gz
dexon-solidity-d0791fb365bd90c8d4b4f3ba6f83b126087d9a8e.tar.bz2
dexon-solidity-d0791fb365bd90c8d4b4f3ba6f83b126087d9a8e.tar.lz
dexon-solidity-d0791fb365bd90c8d4b4f3ba6f83b126087d9a8e.tar.xz
dexon-solidity-d0791fb365bd90c8d4b4f3ba6f83b126087d9a8e.tar.zst
dexon-solidity-d0791fb365bd90c8d4b4f3ba6f83b126087d9a8e.zip
Fix assignment after tags in inline assembly
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp
index ee9c150e..8d2c2ed4 100644
--- a/libsolidity/inlineasm/AsmParser.cpp
+++ b/libsolidity/inlineasm/AsmParser.cpp
@@ -95,7 +95,9 @@ assembly::Statement Parser::parseStatement()
fatalParserError("Label name / variable name must precede \":\".");
assembly::Identifier const& identifier = boost::get<assembly::Identifier>(statement);
m_scanner->next();
- if (m_scanner->currentToken() == Token::Assign)
+ // identifier:=: should be parsed as identifier: =: (i.e. a label),
+ // while identifier:= (being followed by a non-colon) as identifier := (assignment).
+ if (m_scanner->currentToken() == Token::Assign && m_scanner->peekNextToken() != Token::Colon)
{
// functional assignment
FunctionalAssignment funAss = createWithLocation<FunctionalAssignment>(identifier.location);