Promote gwei to a proper keyword.

This commit is contained in:
Daniel Kirchner
2020-07-13 18:07:11 +02:00
committed by Leonardo Alt
parent 38c6ecbbe2
commit c3e13b6733
7 changed files with 13 additions and 15 deletions
+1 -1
View File
@@ -430,7 +430,7 @@ BOOST_AUTO_TEST_CASE(ether_subdenominations)
{
Scanner scanner(CharStream("wei gwei ether", ""));
BOOST_CHECK_EQUAL(scanner.currentToken(), Token::SubWei);
BOOST_CHECK_EQUAL(scanner.next(), Token::Identifier);
BOOST_CHECK_EQUAL(scanner.next(), Token::SubGwei);
BOOST_CHECK_EQUAL(scanner.next(), Token::SubEther);
}
@@ -1,7 +1,7 @@
contract C {
uint constant gwei = 1 gwei;
uint constant x = 1 gwei;
function f() public view returns(uint) { return gwei; }
function f() public view returns(uint) { return x; }
}
// ====
// compileViaYul: also
@@ -1,3 +0,0 @@
contract C {
uint constant gwei = 1 gwei;
}
@@ -0,0 +1,5 @@
contract C {
uint constant gwei = 1;
}
// ----
// ParserError 2314: (28-32): Expected identifier but got 'gwei'