Class: Lisp::Format::Directives::EndConditional

Inherits:
Directive show all
Defined in:
lib/carat/lisp-format.rb

Overview

Represents the ~] (End conditional expression) directive. It ends a conditional expression, and is an error if it appears without a matching opening conditional expression.

Instance Attribute Summary

Attributes inherited from Directive

#pos

Instance Method Summary collapse

Methods inherited from Directive

#execute, #join

Constructor Details

#initialize(params, modifiers, top, pos) ⇒ EndConditional

Returns a new instance of EndConditional.



1603
1604
1605
1606
1607
1608
# File 'lib/carat/lisp-format.rb', line 1603

def initialize(params, modifiers, top, pos)
  super params, modifiers, top, pos
  unless top.is_a? BeginConditional
    raise SyntaxError.new(@pos), '~) without matching ~('
  end
end