Implemented parsing for UserDefinedValueType

Also added parsing tests.
This commit is contained in:
hrkrshnn
2021-09-07 19:42:51 +02:00
parent d3ae9cf71b
commit 9f7426b4a9
5 changed files with 36 additions and 0 deletions
@@ -0,0 +1,5 @@
type MyInt is uint;
contract C {
type MyAddress is address;
}
@@ -0,0 +1,3 @@
type(MyInt) is uint256;
// ----
// ParserError 2314: (4-5): Expected identifier but got '('
@@ -0,0 +1,6 @@
function f() {
type(uint).max;
type MyInt is int;
}
// ----
// ParserError 2314: (44-49): Expected ';' but got identifier