mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9305 from ethereum/yul-dot-tests
Add Yul syntax tests for dots in identifiers
This commit is contained in:
commit
0ac039e4ea
6
test/libyul/yulSyntaxTests/are_we_perl_yet.yul
Normal file
6
test/libyul/yulSyntaxTests/are_we_perl_yet.yul
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
function _...($..) {}
|
||||
let a...
|
||||
_...(a...)
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_consecutive_function.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_consecutive_function.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x..y() {}
|
||||
}
|
||||
// ----
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x(a..b) {}
|
||||
}
|
||||
// ----
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x() -> a..b {}
|
||||
}
|
||||
// ----
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
let a..b := 1
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_ellipse_function.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_ellipse_function.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x...y() {}
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_ellipse_function_arg.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_ellipse_function_arg.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x(a...b) {}
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_ellipse_function_ret.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_ellipse_function_ret.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x() -> a...b {}
|
||||
}
|
||||
// ----
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
let a...b := 1
|
||||
}
|
||||
// ----
|
5
test/libyul/yulSyntaxTests/dot_leading_function.yul
Normal file
5
test/libyul/yulSyntaxTests/dot_leading_function.yul
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
function .x() {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (15-16): Expected identifier but got '.'
|
5
test/libyul/yulSyntaxTests/dot_leading_function_arg.yul
Normal file
5
test/libyul/yulSyntaxTests/dot_leading_function_arg.yul
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
function x(.a) {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (17-18): Expected identifier but got '.'
|
5
test/libyul/yulSyntaxTests/dot_leading_function_ret.yul
Normal file
5
test/libyul/yulSyntaxTests/dot_leading_function_ret.yul
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
function x() -> .a {}
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (22-23): Expected identifier but got '.'
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
let .a := 1
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (10-11): Expected identifier but got '.'
|
4
test/libyul/yulSyntaxTests/dot_middle_function.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_middle_function.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x.y() {}
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_middle_function_arg.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_middle_function_arg.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x(a.b) {}
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_middle_function_ret.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_middle_function_ret.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x() -> a.b {}
|
||||
}
|
||||
// ----
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
let a.b := 1
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_trailing_function.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_trailing_function.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x.() {}
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_trailing_function_arg.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_trailing_function_arg.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x(a.) {}
|
||||
}
|
||||
// ----
|
4
test/libyul/yulSyntaxTests/dot_trailing_function_ret.yul
Normal file
4
test/libyul/yulSyntaxTests/dot_trailing_function_ret.yul
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
function x() -> a. {}
|
||||
}
|
||||
// ----
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
let a. := 1
|
||||
}
|
||||
// ----
|
Loading…
Reference in New Issue
Block a user