From 21d0d7901cc378181034c0db6221bca5adca591e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 14 Sep 2018 14:11:54 -0700 Subject: Upgraded nomsu.2.peg and fixed minor bug in Source serialization in trees. --- syntax_tree.moon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'syntax_tree.moon') diff --git a/syntax_tree.moon b/syntax_tree.moon index 2f46d9e..cd9bccc 100644 --- a/syntax_tree.moon +++ b/syntax_tree.moon @@ -19,8 +19,8 @@ for name in *types .__name = name .type = name .is_instance = (x)=> getmetatable(x) == @ - .__tostring = => "#{@type}#{repr @, ((x)-> Source\is_instance(x) and tostring(x) or nil)}" - .__repr = => "#{@type}#{repr @, ((x)-> Source\is_instance(x) and tostring(x) or nil)}" + .__tostring = => "#{@type}#{repr @, ((x)-> Source\is_instance(x) and repr(tostring(x)) or nil)}" + .__repr = => "#{@type}#{repr @, ((x)-> Source\is_instance(x) and repr(tostring(x)) or nil)}" .source_code_for_tree = {} .get_source_code = => @source_code_for_tree[@] .map = (fn)=> -- cgit v1.2.3