Class: PHPRB::Compiler::Scanner
Constant Summary
collapse
- SplitRegexp =
/(<[?%][?%])|([?%][?%]>)|(<[?%]=)|(<[?%]#)|(<[?%])|([?%]>)|(\n)/
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(src, trim_mode, percent) ⇒ Scanner
Returns a new instance of Scanner.
44
45
46
47
|
# File 'lib/web/phprb.rb', line 44
def initialize(src, trim_mode, percent)
@src = src
@stag = nil
end
|
Instance Attribute Details
Returns the value of attribute stag.
48
49
50
|
# File 'lib/web/phprb.rb', line 48
def stag
@stag
end
|
Class Method Details
.default_scanner=(klass) ⇒ Object
35
36
37
|
# File 'lib/web/phprb.rb', line 35
def self.default_scanner=(klass)
@default_scanner = klass
end
|
.make_scanner(src, trim_mode, percent) ⇒ Object
39
40
41
42
|
# File 'lib/web/phprb.rb', line 39
def self.make_scanner(src, trim_mode, percent)
klass = @scanner_map.fetch([trim_mode, percent], @default_scanner)
klass.new(src, trim_mode, percent)
end
|
.regist_scanner(klass, trim_mode, percent) ⇒ Object
31
32
33
|
# File 'lib/web/phprb.rb', line 31
def self.regist_scanner(klass, trim_mode, percent)
@scanner_map[[trim_mode, percent]] = klass
end
|
Instance Method Details
50
|
# File 'lib/web/phprb.rb', line 50
def scan; end
|