From 82cfd3e54b5910843c091a9fb6ef3ad6b64ba757 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 14 Jun 2018 21:59:25 -0700 Subject: More streamlining and cleanup. Especially for core/metaprogramming.nom --- nomsu_tree.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'nomsu_tree.lua') diff --git a/nomsu_tree.lua b/nomsu_tree.lua index baec3ef..7288613 100644 --- a/nomsu_tree.lua +++ b/nomsu_tree.lua @@ -116,4 +116,16 @@ AST.Action.__init = function(self) end self.stub = concat(stub_bits, " ") end +AST.Action.get_args = function(self) + local _accum_0 = { } + local _len_0 = 1 + for _index_0 = 1, #self do + local tok = self[_index_0] + if type(tok) ~= 'string' then + _accum_0[_len_0] = tok + _len_0 = _len_0 + 1 + end + end + return _accum_0 +end return AST -- cgit v1.2.3