enhanced the compiler to prohibit variable declaration after 'do' if it's the head of block expression
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-11-28 01:44:13 +09:00
parent f3c0c1b8c1
commit 9f4bf7485d
8 changed files with 140 additions and 106 deletions

View File

@ -9,6 +9,7 @@ check_SCRIPTS = \
va-01.hcl
check_ERRORS = \
do-01.err \
feed-01.err \
var-01.err \
var-02.err \

View File

@ -480,6 +480,7 @@ check_SCRIPTS = \
va-01.hcl
check_ERRORS = \
do-01.err \
feed-01.err \
var-01.err \
var-02.err \

3
t/do-01.err Normal file
View File

@ -0,0 +1,3 @@
## if `do` is not enclosed in `( )`, variable declaration is prohibited
(do | k | (set k 10))
do | k | {set k 10;}; ##ERROR: syntax error - variable declaration disallowed