Class: AdLint::Cpp::UnaryExpression

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

Direct Known Subclasses

DefinedExpression, UnaryArithmeticExpression

Instance Attribute Summary collapse

Attributes inherited from Expression

#value

Instance Method Summary collapse

Methods inherited from Expression

#to_s

Methods inherited from SyntaxNode

#inspect, #short_class_name

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(val, op) ⇒ UnaryExpression

Returns a new instance of UnaryExpression.



788
789
790
791
# File 'lib/adlint/cpp/syntax.rb', line 788

def initialize(val, op)
  super(val)
  @operator = op
end

Instance Attribute Details

#operatorObject (readonly)

Returns the value of attribute operator.



793
794
795
# File 'lib/adlint/cpp/syntax.rb', line 793

def operator
  @operator
end

Instance Method Details

#locationObject



795
796
797
# File 'lib/adlint/cpp/syntax.rb', line 795

def location
  @operator.location
end