diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-09-12 15:31:59 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-09-12 15:32:04 -0700 |
| commit | ea310306d73e0bc6542f7133825549ae4471b06a (patch) | |
| tree | fcc2a5a868fe09fb599d8261f66dad96ac69bb0b /syntax_tree.lua | |
| parent | 9e10c8bf006f42e90a011b8f9284e3ffa52a5859 (diff) | |
Initial working version.
Diffstat (limited to 'syntax_tree.lua')
| -rw-r--r-- | syntax_tree.lua | 8 |
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 |
