aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-01-05 07:25:31 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-01-05 23:53:49 +0800
commita91393f4d74352be022b9a83fc3007881f770ed7 (patch)
tree991c578177a7e762fa88491b438eaa5a08017eda /test/libjulia
parent35095e9fcc53f76a1c73251497c265f399a9896c (diff)
downloaddexon-solidity-a91393f4d74352be022b9a83fc3007881f770ed7.tar.gz
dexon-solidity-a91393f4d74352be022b9a83fc3007881f770ed7.tar.zst
dexon-solidity-a91393f4d74352be022b9a83fc3007881f770ed7.zip
Support some restricted tokens (return, byte, address) as identifiers in Julia
Diffstat (limited to 'test/libjulia')
-rw-r--r--test/libjulia/Parser.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libjulia/Parser.cpp b/test/libjulia/Parser.cpp
index 9aa325a4..3ca62a90 100644
--- a/test/libjulia/Parser.cpp
+++ b/test/libjulia/Parser.cpp
@@ -196,6 +196,14 @@ BOOST_AUTO_TEST_CASE(empty_call)
CHECK_ERROR("{ () }", ParserError, "Literal or identifier expected.");
}
+BOOST_AUTO_TEST_CASE(tokens_as_identifers)
+{
+ BOOST_CHECK(successParse("{ let return:u256 := 1:u256 }"));
+ BOOST_CHECK(successParse("{ let byte:u256 := 1:u256 }"));
+ BOOST_CHECK(successParse("{ let address:u256 := 1:u256 }"));
+ BOOST_CHECK(successParse("{ let bool:u256 := 1:u256 }"));
+}
+
BOOST_AUTO_TEST_CASE(lacking_types)
{
CHECK_ERROR("{ let x := 1:u256 }", ParserError, "Expected token Identifier got 'Assign'");