Skip to content

Commit 0ac039e

Browse files
authored
Merge pull request #9305 from ethereum/yul-dot-tests
Add Yul syntax tests for dots in identifiers
2 parents 8c5fce5 + 8b53f85 commit 0ac039e

21 files changed

+90
-0
lines changed

Diff for: test/libyul/yulSyntaxTests/are_we_perl_yet.yul

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
function _...($..) {}
3+
let a...
4+
_...(a...)
5+
}
6+
// ----
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x..y() {}
3+
}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x(a..b) {}
3+
}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x() -> a..b {}
3+
}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
let a..b := 1
3+
}
4+
// ----

Diff for: test/libyul/yulSyntaxTests/dot_ellipse_function.yul

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x...y() {}
3+
}
4+
// ----
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x(a...b) {}
3+
}
4+
// ----
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x() -> a...b {}
3+
}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
let a...b := 1
3+
}
4+
// ----

Diff for: test/libyul/yulSyntaxTests/dot_leading_function.yul

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
function .x() {}
3+
}
4+
// ----
5+
// ParserError 2314: (15-16): Expected identifier but got '.'
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
function x(.a) {}
3+
}
4+
// ----
5+
// ParserError 2314: (17-18): Expected identifier but got '.'
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
function x() -> .a {}
3+
}
4+
// ----
5+
// ParserError 2314: (22-23): Expected identifier but got '.'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
let .a := 1
3+
}
4+
// ----
5+
// ParserError 2314: (10-11): Expected identifier but got '.'

Diff for: test/libyul/yulSyntaxTests/dot_middle_function.yul

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x.y() {}
3+
}
4+
// ----
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x(a.b) {}
3+
}
4+
// ----
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x() -> a.b {}
3+
}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
let a.b := 1
3+
}
4+
// ----

Diff for: test/libyul/yulSyntaxTests/dot_trailing_function.yul

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x.() {}
3+
}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x(a.) {}
3+
}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
function x() -> a. {}
3+
}
4+
// ----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
let a. := 1
3+
}
4+
// ----

0 commit comments

Comments
 (0)