Module: CTokenizer::Sourced

Included in:
LexerBase
Defined in:
lib/caphir/ctokenizer.rb

Overview

Scoped

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#sourceObject (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

Returns:

  • (Boolean)


254
255
256
# File 'lib/caphir/ctokenizer.rb', line 254

def empty?
	@source.empty?
end

#fileObject



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

#lineObject



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

Returns:

  • (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

#shiftObject



250
251
252
# File 'lib/caphir/ctokenizer.rb', line 250

def shift
	@source.shift
end