author | Francesco Abbate <francesco.bbt@gmail.com> | 2013年05月13日 18:20:21 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2013年05月13日 18:20:21 +0200 |
commit | 8609bf03ac6479678c489c559a8596ef6488af20 (patch) | |
tree | ee798c4ced7a8d15189eaad13f3a6ed39bfb3e33 /expr-parse.lua | |
parent | 3401c496044f22a9b4b57950e526cbe21e2077f4 (diff) | |
download | gsl-shell-8609bf03ac6479678c489c559a8596ef6488af20.tar.gz |
-rw-r--r-- | expr-parse.lua | 4 |
diff --git a/expr-parse.lua b/expr-parse.lua index 85e770e9..a8e72481 100644 --- a/expr-parse.lua +++ b/expr-parse.lua @@ -28,6 +28,10 @@ local function factor(lexer, actions) else return actions.ident(id) end + elseif token.type == 'literal' then + local x = token.value + lexer:next() + return actions.literal(x) elseif token.type == 'number' then local x = token.value lexer:next() |