diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-20 14:33:49 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-20 14:33:57 -0700 |
| commit | 14bda2fb2d881bd2ad4f1a53aabb937b534d545e (patch) | |
| tree | a6ecd7b204f5285a773a32b2b43d63595e547e77 /nomsu_tree.moon | |
| parent | 931ae40f408c789eca3a2bf36e886f174f4f8038 (diff) | |
Cleanups and optimizations.
Diffstat (limited to 'nomsu_tree.moon')
| -rw-r--r-- | nomsu_tree.moon | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/nomsu_tree.moon b/nomsu_tree.moon index c3f33bc..e675b17 100644 --- a/nomsu_tree.moon +++ b/nomsu_tree.moon @@ -8,13 +8,6 @@ immutable = require 'immutable' {:Lua, :Location} = require "lua_obj" -common_methods = { - __tostring: => - "#{@name}(#{repr(@value)})" - with_value: (value)=> getmetatable(self)(value, @source) -} -fields = {"value","source"} - Types = {} Types.DictEntry = immutable({"key","value"}, {name:"DictEntry"}) Types.is_node = (n)-> @@ -23,7 +16,7 @@ Types.is_node = (n)-> -- Helper method: Tree = (name, methods)-> with methods - .__tostring = => "#{@name}(#{repr(@value)})" + .__tostring = => "#{@name}(#{repr(@value)}, #{repr @source})" .with_value = (value)=> getmetatable(self)(value, @source) .type = name .name = name |
