gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/expr-lexer.lua
diff options
context:
space:
mode:
Diffstat (limited to 'expr-lexer.lua')
-rw-r--r--expr-lexer.lua 4
1 files changed, 4 insertions, 0 deletions
diff --git a/expr-lexer.lua b/expr-lexer.lua
index c075d8a5..c13b1c38 100644
--- a/expr-lexer.lua
+++ b/expr-lexer.lua
@@ -52,6 +52,10 @@ function expr_lexer.next_token(lexer)
lexer:skip('%s*')
if lexer.n > len(lexer.src) then return {type= 'EOF'} end
local c = lexer:char()
+ if c == '\'' then
+ local str = lexer:consume("'[^']+'")
+ return {type= 'literal', value = str:sub(2, -2)}
+ end
if c == '[' then
local str = lexer:consume('%b[]')
return {type= 'ident', value= str:sub(2,-2)}
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月26日 22:23:35 +0000

AltStyle によって変換されたページ (->オリジナル) /