aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/storycode.l
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-02-22 23:24:22 +0100
committerThomas White <taw@bitwiz.me.uk>2019-02-22 23:24:22 +0100
commite38820b6adb2be0dafabd517026fd7f8571107b2 (patch)
treefea9d8327e7994bce988648e76a2e59942ec40c7 /libstorycode/storycode.l
parentaee387068f5b9013687250e8d655b56a0c5776f2 (diff)
Fundamentals of rendering
Diffstat (limited to 'libstorycode/storycode.l')
-rw-r--r--libstorycode/storycode.l4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstorycode/storycode.l b/libstorycode/storycode.l
index 46237e5..792637d 100644
--- a/libstorycode/storycode.l
+++ b/libstorycode/storycode.l
@@ -64,8 +64,8 @@ SIZE { return SC_SIZE; }
[{] { return SC_OPENBRACE; }
[}] { return SC_CLOSEBRACE; }
[.\n ] {}
-[0-9\.]+ { /* FIXME: lval */ return SC_VALUE; }
-[uf] { return SC_UNIT; }
+[0-9\.]+ { sclval.val = atof(yytext); return SC_VALUE; }
+[uf] { sclval.character = yytext[0]; return SC_UNIT; }
[+] { return SC_PLUS; }
[x] { return SC_TIMES; }