Class: IRB::SLex
Do not use. This class is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Exception2MessageMapper
|
|
Inherits: | Object |
Defined in: | lib/irb/slex.rb |
Constant Summary
-
DOUT =
# File 'lib/irb/slex.rb', line 24Notifier::def_notifier("SLex::")
-
D_DEBUG =
# File 'lib/irb/slex.rb', line 26DOUT::def_notifier(2, "Debug: ")
-
D_DETAIL =
# File 'lib/irb/slex.rb', line 27DOUT::def_notifier(4, "Detail: ")
-
D_WARN =
# File 'lib/irb/slex.rb', line 25DOUT::def_notifier(1, "Warn: ")
Class Method Summary
- .new ⇒ SLex constructor
Instance Method Summary
Constructor Details
.new ⇒ SLex
Instance Method Details
#create(token, preproc = nil, postproc = nil)
[ GitHub ]#def_rule(token, preproc = nil, postproc = nil, &block)
[ GitHub ]#def_rules(*tokens, &block)
[ GitHub ]# File 'lib/irb/slex.rb', line 42
def def_rules(*tokens, &block) if block_given? p = block end for token in tokens def_rule(token, nil, p) end end
#inspect
[ GitHub ]# File 'lib/irb/slex.rb', line 83
def inspect format("<SLex: @head = %s>", @head.inspect) end
#match(token)
[ GitHub ]#postproc(token)
need a check?
# File 'lib/irb/slex.rb', line 57
def postproc(token) node = search(token, proc) node.postproc=proc end
#preproc(token, proc)
[ GitHub ]# File 'lib/irb/slex.rb', line 51
def preproc(token, proc) node = search(token) node.preproc=proc end
#search(token)
[ GitHub ]# File 'lib/irb/slex.rb', line 62
def search(token) @head.search(token.split(//)) end