Module: CTokenizer::Sourced
- Included in:
- LexerBase
- Defined in:
- lib/caphir/ctokenizer.rb
Overview
Scoped
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #file ⇒ Object
- #file=(val) ⇒ Object
- #line ⇒ Object
- #line=(val) ⇒ Object
- #match?(regexp) ⇒ Boolean
- #scan(regexp) ⇒ Object
- #shift ⇒ Object
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
227 228 229 |
# File 'lib/caphir/ctokenizer.rb', line 227 def source @source end |
Instance Method Details
#empty? ⇒ Boolean
254 255 256 |
# File 'lib/caphir/ctokenizer.rb', line 254 def empty? @source.empty? end |
#file ⇒ Object
237 238 239 |
# File 'lib/caphir/ctokenizer.rb', line 237 def file @source.file end |
#file=(val) ⇒ Object
240 241 242 |
# File 'lib/caphir/ctokenizer.rb', line 240 def file=(val) @source.file = val end |
#line ⇒ Object
243 244 245 |
# File 'lib/caphir/ctokenizer.rb', line 243 def line @source.line end |
#line=(val) ⇒ Object
246 247 248 |
# File 'lib/caphir/ctokenizer.rb', line 246 def line=(val) @source.line = val end |
#match?(regexp) ⇒ Boolean
233 234 235 |
# File 'lib/caphir/ctokenizer.rb', line 233 def match?(regexp) @source.match?(regexp) end |
#scan(regexp) ⇒ Object
229 230 231 |
# File 'lib/caphir/ctokenizer.rb', line 229 def scan(regexp) @source.scan(regexp) end |
#shift ⇒ Object
250 251 252 |
# File 'lib/caphir/ctokenizer.rb', line 250 def shift @source.shift end |