Rewrite of the antlr grammar.

This commit is contained in:
Daniel Kirchner
2020-08-19 17:55:31 +02:00
committed by chriseth
parent 9e488f12fc
commit bd21535dd1
14 changed files with 963 additions and 513 deletions
@@ -0,0 +1,5 @@
contract C {
constructor() internal internal {}
}
// ----
// ParserError 9439: (38-46): Visibility already specified as "internal".
@@ -0,0 +1,5 @@
contract C {
constructor() internal public {}
}
// ----
// ParserError 9439: (38-44): Visibility already specified as "internal".
@@ -0,0 +1,5 @@
contract C {
constructor() payable payable {}
}
// ----
// ParserError 9680: (37-44): State mutability already specified as "payable".
@@ -0,0 +1,5 @@
contract C {
constructor() public internal {}
}
// ----
// ParserError 9439: (36-44): Visibility already specified as "public".
@@ -0,0 +1,5 @@
contract C {
constructor() public public {}
}
// ----
// ParserError 9439: (36-42): Visibility already specified as "public".
@@ -0,0 +1,7 @@
contract C {
function f() public pure {
function() pure pure g;
}
}
// ----
// ParserError 9680: (62-66): State mutability already specified as "pure".
@@ -0,0 +1,7 @@
contract C {
function f() public pure {
function() public public g;
}
}
// ----
// ParserError 9439: (64-70): Visibility already specified as "public".