From 3fd5687370c3ef28c1878a79f0b4173e7212795f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 10 Jul 2018 17:10:37 -0700 Subject: Fixed up line numbers for generated code. --- code_obj.moon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'code_obj.moon') diff --git a/code_obj.moon b/code_obj.moon index 74e9a15..8ac7146 100644 --- a/code_obj.moon +++ b/code_obj.moon @@ -48,7 +48,7 @@ class Code @bits, @indents, @current_indent = {}, {}, 0 if type(@source) == 'string' @source = Source\from_string(@source) - assert(@source and Source\is_instance(@source)) + assert(@source and Source\is_instance(@source), "Source has the wrong type") @append(...) append: (...)=> @@ -57,7 +57,7 @@ class Code match = string.match for i=1,n b = select(i, ...) - assert(b) + assert(b, "bit is nil") if b == '' then continue bits[#bits+1] = b if type(b) == 'string' -- cgit v1.2.3