enhanced the binop expression check in leave_list() in read.c
All checks were successful
continuous-integration/drone/push Build is passing

fixed the issue of the lost line terminator after the comment text which caused the next line to be treated as the same line
This commit is contained in:
2024-03-09 17:10:51 +09:00
parent 081c6d1874
commit 8345e2f949
7 changed files with 50 additions and 23 deletions

View File

@ -23,8 +23,7 @@ defun mkfun(t) {
defun mkfund(t) {
return {fun(c) {
return (fun(d) {
##return (d + c t) ## this causes assertion failure.
return (d + c t)
return (+ d c t)
})
}}
}
@ -47,10 +46,8 @@ if (k = 50) {
};
k := {
## the return value of this expression is ignored
(mkfun 20) 30 ## having comment here cause an issue...
## the return value of this expression is the return value of the block expression
(mkfun 20) 40
(mkfun 20) 30 ## the return value of this expression is ignored
(mkfun 20) 40 ## the return value of this expression is the return value of the block expression
}
if (k = 60) {
printf "OK - %d\n" k