aboutsummaryrefslogtreecommitdiff
path: root/syntax_tree.lua
diff options
context:
space:
mode:
Diffstat (limited to 'syntax_tree.lua')
-rw-r--r--syntax_tree.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/syntax_tree.lua b/syntax_tree.lua
index 8fa15b7..b4cf45e 100644
--- a/syntax_tree.lua
+++ b/syntax_tree.lua
@@ -26,7 +26,9 @@ local types = {
"DictEntry",
"IndexChain",
"Action",
- "FileChunks"
+ "FileChunks",
+ "Error",
+ "Comment"
}
for _index_0 = 1, #types do
local name = types[_index_0]
@@ -49,6 +51,10 @@ for _index_0 = 1, #types do
return Source:is_instance(x) and tostring(x) or nil
end)))
end
+ cls.source_code_for_tree = { }
+ cls.get_source_code = function(self)
+ return self.source_code_for_tree[self]
+ end
cls.map = function(self, fn)
local replacement = fn(self)
if replacement == false then