From 4e8a12d70de2212d23c51030b51a9a75020cb24c Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Thu, 31 Dec 2009 13:45:07 -0500 Subject: [PATCH] done commenting the rewriter --- lib/coffee_script/rewriter.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/coffee_script/rewriter.rb b/lib/coffee_script/rewriter.rb index 0fa0e100..b0319623 100644 --- a/lib/coffee_script/rewriter.rb +++ b/lib/coffee_script/rewriter.rb @@ -166,10 +166,12 @@ module CoffeeScript puts "rewrite_closing_original: #{@tokens.inspect}" if verbose scan_tokens do |prev, token, post, i| tag, inv = token[0], INVERSES[token[0]] + # Push openers onto the stack. if EXPRESSION_START.include?(tag) stack.push(token) puts "pushing #{tag} #{stack_stats[]}" if verbose next 1 + # The end of an expression, check stack and debt for a pair. elsif EXPRESSION_TAIL.include?(tag) puts @tokens[i..-1].inspect if verbose # If the tag is already in our debt, swallow it.