Class: Grammar::Ruby::Code::Primary

Inherits:
Grammar::Ruby::Code show all
Defined in:
lib/grammar/ruby/code.rb

Direct Known Subclasses

Immediate, Singleton

Constant Summary

Constants inherited from Grammar::Ruby::Code

False, FalseTerminator, Implicit, Nil, Self, True

Instance Method Summary collapse

Methods inherited from Grammar::Ruby::Code

[], #_and, #_assign, #_classname, #_code_self, #_def, #_dot, #_else, #_ensure, #_equal, #_immediate, #_inspect, #_not, #_or, #_question, #_rand, #_rcond, #_rescue, #_ror, #_rstep, #_splat, #_to_block, #_unless, #_until, #_while, #initialize, #method_missing

Constructor Details

This class inherits a constructor from Grammar::Ruby::Code

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Grammar::Ruby::Code

Instance Method Details

#_alwaysObject



209
210
211
# File 'lib/grammar/ruby/code.rb', line 209

def _always
    false
end

#_codesObject



203
204
205
# File 'lib/grammar/ruby/code.rb', line 203

def _codes
    []
end

#_dataObject



206
207
208
# File 'lib/grammar/ruby/code.rb', line 206

def _data
    @code
end

#_lines(text, indent = 0, op = nil, maxlen = 72) ⇒ Object



200
201
202
# File 'lib/grammar/ruby/code.rb', line 200

def _lines(text, indent=0, op=nil, maxlen=72)
    text.last.concat(@code)
end

#_locals(n = 0) ⇒ Object



221
222
223
# File 'lib/grammar/ruby/code.rb', line 221

def _locals(n=0)
    n
end

#_mid(before) ⇒ Object



215
216
217
# File 'lib/grammar/ruby/code.rb', line 215

def _mid(before)
    before
end

#_neverObject



212
213
214
# File 'lib/grammar/ruby/code.rb', line 212

def _never
    false
end

#_step(after) ⇒ Object



218
219
220
# File 'lib/grammar/ruby/code.rb', line 218

def _step(after)
    after
end