Class: PHPRB::Compiler::Scanner
Instance Attribute Summary collapse
-
#stag ⇒ Object
Returns the value of attribute stag.
Instance Method Summary collapse
- #etag_exp ⇒ Object
-
#initialize(src, xml_mode = nil) ⇒ Scanner
constructor
A new instance of Scanner.
- #stag_exp ⇒ Object
Constructor Details
#initialize(src, xml_mode = nil) ⇒ Scanner
Returns a new instance of Scanner.
49 50 51 52 53 |
# File 'lib/web/phprb.rb', line 49 def initialize(src, xml_mode=nil) @src = src @stag = nil @xml_mode = xml_mode end |
Instance Attribute Details
#stag ⇒ Object
Returns the value of attribute stag.
54 55 56 |
# File 'lib/web/phprb.rb', line 54 def stag @stag end |
Instance Method Details
#etag_exp ⇒ Object
66 67 68 |
# File 'lib/web/phprb.rb', line 66 def etag_exp '(\?\?>)|(--->)|(\?>)' end |
#stag_exp ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/web/phprb.rb', line 57 def stag_exp open_pattern = if @xml_mode '\?ruby' else '\?(ruby)?' end '(<\?\?)|(<' + open_pattern + '=)|(<!---)|(<' + open_pattern + ')' end |