diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-20 11:42:45 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-20 11:42:45 +0000 |
| commit | a3335110dc4f1283cf1680e273cc9775b7e8c8ac (patch) | |
| tree | 15866ec0503d1edac9a1d9e11c04f7cdc7473d8d /tests/i/c-string-literals/program.cps | |
| parent | 52e0674c54d4b53b2132e750106cc9acb266ed39 (diff) | |
feat(lexer): add C_STRING literal suffix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/i/c-string-literals/program.cps')
| -rw-r--r-- | tests/i/c-string-literals/program.cps | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/i/c-string-literals/program.cps b/tests/i/c-string-literals/program.cps new file mode 100644 index 0000000..ac2f7b0 --- /dev/null +++ b/tests/i/c-string-literals/program.cps @@ -0,0 +1,13 @@ +DECLARE Text : C_STRING +Text <- "quote:\" slash:\\"C +OUTPUT (STRING)Text +OUTPUT (STRING)"\101\x42"C +CONSTANT Empty = ""C +OUTPUT LENGTH((STRING)Empty) +OVERLOAD FUNCTION Kind(Text : STRING) RETURNS INTEGER + RETURN 1 +ENDFUNCTION +OVERLOAD FUNCTION Kind(Text : C_STRING) RETURNS INTEGER + RETURN 2 +ENDFUNCTION +OUTPUT Kind("text"), ":", Kind("text"C) |
