diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-01-05 07:25:31 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-01-05 23:53:49 +0800 |
commit | a91393f4d74352be022b9a83fc3007881f770ed7 (patch) | |
tree | 991c578177a7e762fa88491b438eaa5a08017eda /test/libjulia | |
parent | 35095e9fcc53f76a1c73251497c265f399a9896c (diff) | |
download | dexon-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.cpp | 8 |
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'"); |