gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/expr-print.lua
diff options
context:
space:
mode:
Diffstat (limited to 'expr-print.lua')
-rw-r--r--expr-print.lua 6
1 files changed, 4 insertions, 2 deletions
diff --git a/expr-print.lua b/expr-print.lua
index 0520d776..a14d400c 100644
--- a/expr-print.lua
+++ b/expr-print.lua
@@ -1,4 +1,5 @@
local expr_lexer = require 'expr-lexer'
+local AST = require 'expr-actions'
local format, concat = string.format, table.concat
@@ -108,8 +109,9 @@ end
local function ref_list_rec(expr, list)
if type(expr) == 'number' then
return
- elseif type(expr) == 'string' then
- list[expr] = true
+ elseif AST.is_variable(expr) then
+ local _, var_name = AST.is_variable(expr)
+ list[var_name] = true
elseif expr.literal then
return
elseif expr.func then
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月13日 19:59:35 +0000

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