added interrupt class for continue/break statements

When a continue or break statement is executed it pushes an interrupt to a
stack in context. If any non-handled interrupts are present blocks will cease
to execute. The for loop can handle the most recent interrupt in the stack.
This commit is contained in:
Jon Daniel
2012-08-21 13:14:27 -04:00
parent 484fd18612
commit 9c183bea83
11 changed files with 171 additions and 37 deletions
-5
View File
@@ -8,9 +8,4 @@ module Liquid
class StandardError < Error; end
class SyntaxError < Error; end
class StackLevelError < Error; end
class Interrupt < Error; end
class BreakInterrupt < Interrupt; end
class ContinueInterrupt < Interrupt; end
end