Class: AdLint::Cpp::ErrorExpression

Inherits:
Expression show all
Defined in:
lib/adlint/cpp/syntax.rb

Instance Attribute Summary collapse

Attributes inherited from Expression

#value

Instance Method Summary collapse

Methods inherited from SyntaxNode

#short_class_name

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(err_tok) ⇒ ErrorExpression

Returns a new instance of ErrorExpression.



722
723
724
725
# File 'lib/adlint/cpp/syntax.rb', line 722

def initialize(err_tok)
  super(0)
  @error_token = err_tok
end

Instance Attribute Details

#error_tokenObject (readonly)

Returns the value of attribute error_token.



727
728
729
# File 'lib/adlint/cpp/syntax.rb', line 727

def error_token
  @error_token
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



737
738
739
# File 'lib/adlint/cpp/syntax.rb', line 737

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

#locationObject



729
730
731
# File 'lib/adlint/cpp/syntax.rb', line 729

def location
  @error_token.location
end

#to_sObject



733
734
735
# File 'lib/adlint/cpp/syntax.rb', line 733

def to_s
  ""
end