updated the parser to require a colone after a key for @{}
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -37,3 +37,10 @@ BEGIN {
|
||||
BEGIN {
|
||||
@nil = 10 ##ERROR: invalid assignment statement
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
BEGIN {
|
||||
@{};
|
||||
@{ "hello", "world } ##ERROR: colon expected in place of ','
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ function main()
|
||||
tap_ensure (((10,30,30) in c), 0, @SCRIPTNAME, @SCRIPTLINE);
|
||||
|
||||
|
||||
c = @{ "abc", 10, "def", 20.9 };
|
||||
c = @{ "abc": 10, "def": 20.9 };
|
||||
tap_ensure (c["abc"], 10, @SCRIPTNAME, @SCRIPTLINE);
|
||||
tap_ensure (c["def"], 20.9, @SCRIPTNAME, @SCRIPTLINE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user