Class: AdLint::Cc1::Lexer

Inherits:
TokensRelexer show all
Extended by:
Pluggable, Forwardable
Defined in:
lib/adlint/cc1/lexer.rb

Instance Method Summary collapse

Methods included from Pluggable

def_plugin

Methods inherited from TokensRelexer

#next_token

Constructor Details

#initialize(pp_src) ⇒ Lexer

Returns a new instance of Lexer.



41
42
43
44
45
46
47
# File 'lib/adlint/cc1/lexer.rb', line 41

def initialize(pp_src)
  super(pp_src.pp_tokens)
  @lst_toks = []
  @nxt_tok = nil
  @ordinary_identifiers = OrdinaryIdentifiers.new
  @identifier_translation = true
end

Instance Method Details

#disable_identifier_translationObject



65
66
67
# File 'lib/adlint/cc1/lexer.rb', line 65

def disable_identifier_translation
  @identifier_translation = false
end

#enable_identifier_translationObject



61
62
63
# File 'lib/adlint/cc1/lexer.rb', line 61

def enable_identifier_translation
  @identifier_translation = true
end