aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-05-02 16:25:12 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-05-05 21:21:25 +0800
commit804971973d09c97dd12d8a34d50b9c5b556ffee4 (patch)
tree15eea6d2ded58d8f8f8bdd196cc35f064fc79c9a /libsolidity/inlineasm
parentf1f209db4032e7679ab39f0ac1591a43d943b153 (diff)
downloaddexon-solidity-804971973d09c97dd12d8a34d50b9c5b556ffee4.tar
dexon-solidity-804971973d09c97dd12d8a34d50b9c5b556ffee4.tar.gz
dexon-solidity-804971973d09c97dd12d8a34d50b9c5b556ffee4.tar.bz2
dexon-solidity-804971973d09c97dd12d8a34d50b9c5b556ffee4.tar.lz
dexon-solidity-804971973d09c97dd12d8a34d50b9c5b556ffee4.tar.xz
dexon-solidity-804971973d09c97dd12d8a34d50b9c5b556ffee4.tar.zst
dexon-solidity-804971973d09c97dd12d8a34d50b9c5b556ffee4.zip
Show better error message for Julia mode
Diffstat (limited to 'libsolidity/inlineasm')
-rw-r--r--libsolidity/inlineasm/AsmParser.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp
index 07483f80..d9b0b3e0 100644
--- a/libsolidity/inlineasm/AsmParser.cpp
+++ b/libsolidity/inlineasm/AsmParser.cpp
@@ -92,7 +92,7 @@ assembly::Statement Parser::parseStatement()
// Simple instruction (might turn into functional),
// literal,
// identifier (might turn into label or functional assignment)
- Statement statement(parseElementaryOperation());
+ Statement statement(parseElementaryOperation(false));
switch (m_scanner->currentToken())
{
case Token::LParen:
@@ -214,7 +214,11 @@ assembly::Statement Parser::parseElementaryOperation(bool _onlySinglePusher)
break;
}
default:
- fatalParserError("Expected elementary inline assembly operation.");
+ fatalParserError(
+ m_julia ?
+ "Literal or identifier expected." :
+ "Expected elementary inline assembly operation."
+ );
}
m_scanner->next();
return ret;
@@ -322,7 +326,11 @@ assembly::Statement Parser::parseFunctionalInstruction(assembly::Statement&& _in
return ret;
}
else
- fatalParserError("Assembly instruction or function name required in front of \"(\")");
+ fatalParserError(
+ m_julia ?
+ "Function name expected." :
+ "Assembly instruction or function name required in front of \"(\")"
+ );
return {};
}