Class: Rubycc::Preprocess::Preprocessor::Frame

Inherits:
Struct
  • Object
show all
Defined in:
lib/rubycc/preprocess/preprocessor.rb

Overview

One nesting level of a conditional. active is whether this frame's current group is being emitted (its condition held and the frame itself is reachable); taken records whether any group of this #if has been selected yet, so a later #elif/#else knows to stay inert; seen_else guards against an #elif/#else after the #else; parent_active is whether the enclosing context was active when the #if opened, which freezes the whole conditional off when it was not. token is the opening directive, for an "unterminated conditional" diagnosed at end of file.

Instance Attribute Summary collapse

Instance Attribute Details

#activeObject

Returns the value of attribute active

Returns:

  • (Object)

    the current value of active



219
220
221
# File 'lib/rubycc/preprocess/preprocessor.rb', line 219

def active
  @active
end

#parent_activeObject

Returns the value of attribute parent_active

Returns:

  • (Object)

    the current value of parent_active



219
220
221
# File 'lib/rubycc/preprocess/preprocessor.rb', line 219

def parent_active
  @parent_active
end

#seen_elseObject

Returns the value of attribute seen_else

Returns:

  • (Object)

    the current value of seen_else



219
220
221
# File 'lib/rubycc/preprocess/preprocessor.rb', line 219

def seen_else
  @seen_else
end

#takenObject

Returns the value of attribute taken

Returns:

  • (Object)

    the current value of taken



219
220
221
# File 'lib/rubycc/preprocess/preprocessor.rb', line 219

def taken
  @taken
end

#tokenObject

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



219
220
221
# File 'lib/rubycc/preprocess/preprocessor.rb', line 219

def token
  @token
end