Class: AdLint::Cc1::StandardTypeSpecifier

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) ⇒ StandardTypeSpecifier

Returns a new instance of StandardTypeSpecifier.



2722
2723
2724
2725
# File 'lib/adlint/cc1/syntax.rb', line 2722

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

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



2727
2728
2729
# File 'lib/adlint/cc1/syntax.rb', line 2727

def token
  @token
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



2737
2738
2739
# File 'lib/adlint/cc1/syntax.rb', line 2737

def inspect(indent = 0)
  " " * indent + short_class_name
end

#locationObject



2729
2730
2731
# File 'lib/adlint/cc1/syntax.rb', line 2729

def location
  head_location
end

#to_sObject



2733
2734
2735
# File 'lib/adlint/cc1/syntax.rb', line 2733

def to_s
  @token.value
end