|
| 1 | +## Function names |
| 2 | + |
| 3 | +valid-func-name-01 = { FUN1() } |
| 4 | +valid-func-name-02 = { FUN_FUN() } |
| 5 | +valid-func-name-03 = { FUN-FUN() } |
| 6 | +
|
| 7 | +# JUNK 0 is not a valid Identifier start |
| 8 | + |
| 9 | +# JUNK Function names may not be lowercase |
| 10 | + |
| 11 | +# JUNK Function names may not contain lowercase character |
| 12 | + |
| 13 | +# JUNK ? is not a valid Identifier character |
| 14 | + |
| 15 | +## Arguments |
| 16 | + |
| 17 | +positional-args = { FUN(1, "a", msg) } |
| 18 | +named-args = { FUN(x: 1, y: "Y") } |
| 19 | +dense-named-args = { FUN(x: 1, y: "Y") } |
| 20 | +mixed-args = { FUN(1, "a", msg, x: 1, y: "Y") } |
| 21 | +
|
| 22 | +# ERROR Positional arg must not follow keyword args |
| 23 | + |
| 24 | +# ERROR Named arguments must be unique |
| 25 | + |
| 26 | +## Whitespace around arguments |
| 27 | + |
| 28 | +sparse-inline-call = { FUN("a", msg, x: 1) } |
| 29 | +empty-inline-call = { FUN() } |
| 30 | +multiline-call = { FUN("a", msg, x: 1) } |
| 31 | +sparse-multiline-call = { FUN("a", msg, x: 1) } |
| 32 | +empty-multiline-call = { FUN() } |
| 33 | +unindented-arg-number = { FUN(1) } |
| 34 | +unindented-arg-string = { FUN("a") } |
| 35 | +unindented-arg-msg-ref = { FUN(msg) } |
| 36 | +unindented-arg-term-ref = { FUN(-msg) } |
| 37 | +unindented-arg-var-ref = { FUN($var) } |
| 38 | +unindented-arg-call = { FUN(OTHER()) } |
| 39 | +unindented-named-arg = { FUN(x: 1) } |
| 40 | +unindented-closing-paren = { FUN(x) } |
| 41 | +
|
| 42 | +## Optional trailing comma |
| 43 | + |
| 44 | +one-argument = { FUN(1) } |
| 45 | +many-arguments = { FUN(1, 2, 3) } |
| 46 | +inline-sparse-args = { FUN(1, 2, 3) } |
| 47 | +mulitline-args = { FUN(1, 2) } |
| 48 | +mulitline-sparse-args = { FUN(1, 2) } |
| 49 | +
|
| 50 | +## Syntax errors for trailing comma |
| 51 | + |
| 52 | +## Whitespace in named arguments |
| 53 | + |
| 54 | +sparse-named-arg = { FUN(x: 1, y: 2, z: 3) } |
| 55 | +unindented-colon = { FUN(x: 1) } |
| 56 | +unindented-value = { FUN(x: 1) } |
0 commit comments