Class: AdLint::Cc1::TypedefTypeSpecifier

Inherits:
TypeSpecifier show all
Defined in:
lib/adlint/cc1/syntax.rb

Instance Attribute Summary collapse

Attributes inherited from SyntaxNode

#head_token, #subsequent_sequence_point, #tail_token

Instance Method Summary collapse

Methods inherited from SyntaxNode

#head_location, #short_class_name, #tail_location

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(tok) ⇒ TypedefTypeSpecifier

Returns a new instance of TypedefTypeSpecifier.



2743
2744
2745
2746
# File 'lib/adlint/cc1/syntax.rb', line 2743

def initialize(tok)
  super()
  @token = tok
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



2748
2749
2750
# File 'lib/adlint/cc1/syntax.rb', line 2748

def token
  @token
end

Instance Method Details

#identifierObject



2754
2755
2756
# File 'lib/adlint/cc1/syntax.rb', line 2754

def identifier
  @token
end

#inspect(indent = 0) ⇒ Object



2762
2763
2764
2765
# File 'lib/adlint/cc1/syntax.rb', line 2762

def inspect(indent = 0)
  " " * indent + "#{short_class_name} (#{location.inspect}) " +
    @token.value
end

#locationObject



2750
2751
2752
# File 'lib/adlint/cc1/syntax.rb', line 2750

def location
  head_location
end

#to_sObject



2758
2759
2760
# File 'lib/adlint/cc1/syntax.rb', line 2758

def to_s
  @token.value
end