summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <orib@google.com>2013-03-20 12:18:56 -0400
committerOri Bernstein <orib@google.com>2013-03-20 12:18:56 -0400
commit4bc5bb61778432697dc3ce477335ada578cf3474 (patch)
tree39654606fc0de6c073f5e85b44966061f5c6cce8
parent407ef33694a8ac5518297af488759b8f8df19e06 (diff)
downloadmc-4bc5bb61778432697dc3ce477335ada578cf3474.tar.gz
Retab.
-rw-r--r--parse/tok.c4
-rw-r--r--test/matchunion_sl.myr4
2 files changed, 6 insertions, 2 deletions
diff --git a/parse/tok.c b/parse/tok.c
index 0a1cd2e..339fc41 100644
--- a/parse/tok.c
+++ b/parse/tok.c
@@ -526,11 +526,11 @@ static Tok *number(int base)
if (isfloat && base == 10) {
t = mktok(Tfloatlit);
t->str = strdupn(&fbuf[start], fidx - start);
- t->fltval = strtod(t->str, NULL);
+ t->fltval = strtod(t->str, NULL);
} else {
t = mktok(Tintlit);
t->str = strdupn(&fbuf[start], fidx - start);
- t->intval = strtol(t->str, NULL, base);
+ t->intval = strtol(t->str, NULL, base);
}
return t;
diff --git a/test/matchunion_sl.myr b/test/matchunion_sl.myr
index 04cb055..c1fbf83 100644
--- a/test/matchunion_sl.myr
+++ b/test/matchunion_sl.myr
@@ -12,14 +12,18 @@ const main = {
v = `Str "foo"
match v
+ /*
`Int 127:
-> 42
;;
+ */
`Str s:
std.put("%s\n", s)
;;
+ /*
`Nil:
;;
+ */
;;
-> 0
}