mescc: Tinycc support: comma operator.
* module/language/c99/compiler.mes (expr->accu): Handle comma operator. * scaffold/tests/74-multi-line-string.c (test): Test it.
This commit is contained in:
parent
3cdfdd7407
commit
59e663021a
|
@ -449,6 +449,13 @@
|
|||
locals))
|
||||
(pmatch o
|
||||
((expr) info)
|
||||
|
||||
((comma-expr) info)
|
||||
|
||||
((comma-expr ,a . ,rest)
|
||||
(let ((info ((expr->accu info) a)))
|
||||
((expr->accu info) `(comma-expr ,@rest))))
|
||||
|
||||
((p-expr (string ,string))
|
||||
(let* ((globals ((globals:add-string globals) string))
|
||||
(info (clone info #:globals globals)))
|
||||
|
|
|
@ -31,7 +31,7 @@ char const* help =
|
|||
int
|
||||
test ()
|
||||
{
|
||||
if (strcmp (help, "All your base are")) return 1;
|
||||
if (printf ("belong to us"), strcmp (help, "All your base are")) return 1;
|
||||
|
||||
return 0;
|
||||
return 2,1,0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue