aboutsummaryrefslogtreecommitdiff
path: root/examples/translator.c
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2021-01-03 01:19:12 +0300
committerAleksey Veresov <aleksey@veresov.pro>2021-01-03 01:19:12 +0300
commitabfe132b83219efa30220ecfdaf6e26e31b9d13d (patch)
tree70d33ac10f4e3e24b0e3ac496017f465dcdec1ae /examples/translator.c
parentfaab24e5a6766880c7e4a33433cb4146e3f8a302 (diff)
downloadcsx-abfe132b83219efa30220ecfdaf6e26e31b9d13d.tar
csx-abfe132b83219efa30220ecfdaf6e26e31b9d13d.tar.xz
csx-abfe132b83219efa30220ecfdaf6e26e31b9d13d.zip
Input-output added.
Diffstat (limited to 'examples/translator.c')
-rw-r--r--examples/translator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/translator.c b/examples/translator.c
index 448d052..ad676c0 100644
--- a/examples/translator.c
+++ b/examples/translator.c
@@ -14,7 +14,7 @@ void readlist()
readlist();
printf("0)");
c = getchar();
- } else if (isdigit(c)) {
+ } else if (isdigit(c) || c == '-') {
if (first) first = 0;
else putchar(',');
printf("csx_num(");