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-actions.lua | |
parent | 3401c496044f22a9b4b57950e526cbe21e2077f4 (diff) | |
download | gsl-shell-8609bf03ac6479678c489c559a8596ef6488af20.tar.gz |
-rw-r--r-- | expr-actions.lua | 5 |
diff --git a/expr-actions.lua b/expr-actions.lua index 8ba169a1..3e82cf1c 100644 --- a/expr-actions.lua +++ b/expr-actions.lua @@ -29,6 +29,10 @@ end local function ident_action(id) return id end +local function literal_action(name) + return {literal= name} +end + -- return true iff expr is a variable (with enums or not). -- if it is a variable returns, in addition, the var_name and the enumeration flag local function is_variable(expr) @@ -47,6 +51,7 @@ end return { infix = infix_action, ident = ident_action, + literal = literal_action, prefix = prefix_action, enum = enum_action, func_eval = func_eval_action, |