enhanced the test runner for errors to support multiple scripts in a single file
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -1,2 +1,69 @@
|
||||
## you can't have another colon before the method..
|
||||
(obj: :method) ##ERROR: syntax error - : disallowed
|
||||
|
||||
---
|
||||
|
||||
## while EOL is ignored in explicitly parenthesized XLIST, a semicolon must not be.
|
||||
(printf
|
||||
"hello, world\n"
|
||||
)
|
||||
|
||||
(printf; ##ERROR: syntax error - unexpected semicolon
|
||||
"hello, world\n"
|
||||
)
|
||||
|
||||
---
|
||||
|
||||
## semicolon inside #{} must raise a syntax error
|
||||
|
||||
a := #{
|
||||
"k1":
|
||||
"hello k1\n",
|
||||
"k2":
|
||||
"hello k2\n"; ##ERROR: syntax error - unexpected semicolon
|
||||
};
|
||||
|
||||
---
|
||||
|
||||
{
|
||||
;;;
|
||||
|
||||
(do
|
||||
(printf "hello\n")
|
||||
(printf "hello\n")
|
||||
);;
|
||||
|
||||
k := [10 ; 20 ]; ##ERROR: syntax error - unexpected semicolon
|
||||
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
## a code point greater than 255 is illegal in the character literal prefix fixed with b.
|
||||
|
||||
printf "[%c] [#x%x] [%d]\n" '★' '★' #x2605;
|
||||
printf "[%c]\n" b'★'; ##ERROR: syntax error - wrong character literal
|
||||
|
||||
---
|
||||
|
||||
## #b can be followed by [ or binary digits.
|
||||
|
||||
printf "%O\n" #b[ 10 20 30 ];
|
||||
printf "%010b\n" #b0101;
|
||||
printf "%O\n" #bxy; ##ERROR: syntax error - neither valid radixed number nor valid directive #bxy
|
||||
|
||||
---
|
||||
|
||||
printf :*; ##ERROR: syntax error - prohibited in this context
|
||||
|
||||
---
|
||||
|
||||
defun :: fun1() { ##ERROR: syntax error - function name not symbol in defun
|
||||
return 10;
|
||||
};
|
||||
|
||||
---
|
||||
|
||||
defun :* fun1() { ##ERROR: syntax error - function name not symbol in defun
|
||||
return 10;
|
||||
};
|
||||
|
Reference in New Issue
Block a user