Class: AdLint::Cpp::DefinedExpression
Instance Attribute Summary collapse
#operator
Attributes inherited from Expression
#value
Instance Method Summary
collapse
#location
Methods inherited from SyntaxNode
#location, #short_class_name
#analysis_target?
Methods included from Visitable
#accept
Constructor Details
819
820
821
822
|
# File 'lib/adlint/cpp/syntax.rb', line 819
def initialize(val, op, id)
super(val, op)
@identifier = id
end
|
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier.
824
825
826
|
# File 'lib/adlint/cpp/syntax.rb', line 824
def identifier
@identifier
end
|
Instance Method Details
#inspect(indent = 0) ⇒ Object
830
831
832
833
|
# File 'lib/adlint/cpp/syntax.rb', line 830
def inspect(indent = 0)
" " * indent + "#{short_class_name} " +
"(#{operator.inspect} #{@identifier.inspect}"
end
|
#to_s ⇒ Object
826
827
828
|
# File 'lib/adlint/cpp/syntax.rb', line 826
def to_s
"#{operator.value}(#{@identifier.value})"
end
|