Class: Flexr::IR::Rule

Inherits:
Struct
  • Object
show all
Defined in:
lib/flexr/ir.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



5
6
7
# File 'lib/flexr/ir.rb', line 5

def action
  @action
end

#bol_onlyObject

Returns the value of attribute bol_only

Returns:

  • (Object)

    the current value of bol_only



5
6
7
# File 'lib/flexr/ir.rb', line 5

def bol_only
  @bol_only
end

#end_anchorObject

Returns the value of attribute end_anchor

Returns:

  • (Object)

    the current value of end_anchor



5
6
7
# File 'lib/flexr/ir.rb', line 5

def end_anchor
  @end_anchor
end

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



5
6
7
# File 'lib/flexr/ir.rb', line 5

def index
  @index
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



5
6
7
# File 'lib/flexr/ir.rb', line 5

def location
  @location
end

#pattern_conditionsObject

Returns the value of attribute pattern_conditions

Returns:

  • (Object)

    the current value of pattern_conditions



5
6
7
# File 'lib/flexr/ir.rb', line 5

def pattern_conditions
  @pattern_conditions
end

#patternsObject

Returns the value of attribute patterns

Returns:

  • (Object)

    the current value of patterns



5
6
7
# File 'lib/flexr/ir.rb', line 5

def patterns
  @patterns
end

#statesObject

Returns the value of attribute states

Returns:

  • (Object)

    the current value of states



5
6
7
# File 'lib/flexr/ir.rb', line 5

def states
  @states
end

#trailingObject

Returns the value of attribute trailing

Returns:

  • (Object)

    the current value of trailing



5
6
7
# File 'lib/flexr/ir.rb', line 5

def trailing
  @trailing
end

Instance Method Details

#emit?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/flexr/ir.rb', line 14

def emit?
  action.is_a?(Array) && action.first == :emit
end

#skip?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/flexr/ir.rb', line 10

def skip?
  action == :skip
end