Add Yul syntax tests for dots in identifiers

This commit is contained in:
Alex Beregszaszi 2020-07-03 15:31:06 +01:00
parent 3d96e2b11a
commit 8b53f85e28
21 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,6 @@
{
function _...($..) {}
let a...
_...(a...)
}
// ----

View File

@ -0,0 +1,4 @@
{
function x..y() {}
}
// ----

View File

@ -0,0 +1,4 @@
{
function x(a..b) {}
}
// ----

View File

@ -0,0 +1,4 @@
{
function x() -> a..b {}
}
// ----

View File

@ -0,0 +1,4 @@
{
let a..b := 1
}
// ----

View File

@ -0,0 +1,4 @@
{
function x...y() {}
}
// ----

View File

@ -0,0 +1,4 @@
{
function x(a...b) {}
}
// ----

View File

@ -0,0 +1,4 @@
{
function x() -> a...b {}
}
// ----

View File

@ -0,0 +1,4 @@
{
let a...b := 1
}
// ----

View File

@ -0,0 +1,5 @@
{
function .x() {}
}
// ----
// ParserError 2314: (15-16): Expected identifier but got '.'

View File

@ -0,0 +1,5 @@
{
function x(.a) {}
}
// ----
// ParserError 2314: (17-18): Expected identifier but got '.'

View File

@ -0,0 +1,5 @@
{
function x() -> .a {}
}
// ----
// ParserError 2314: (22-23): Expected identifier but got '.'

View File

@ -0,0 +1,5 @@
{
let .a := 1
}
// ----
// ParserError 2314: (10-11): Expected identifier but got '.'

View File

@ -0,0 +1,4 @@
{
function x.y() {}
}
// ----

View File

@ -0,0 +1,4 @@
{
function x(a.b) {}
}
// ----

View File

@ -0,0 +1,4 @@
{
function x() -> a.b {}
}
// ----

View File

@ -0,0 +1,4 @@
{
let a.b := 1
}
// ----

View File

@ -0,0 +1,4 @@
{
function x.() {}
}
// ----

View File

@ -0,0 +1,4 @@
{
function x(a.) {}
}
// ----

View File

@ -0,0 +1,4 @@
{
function x() -> a. {}
}
// ----

View File

@ -0,0 +1,4 @@
{
let a. := 1
}
// ----