Class: AdLint::Cpp::DefinedExpression
- Inherits:
-
UnaryExpression
- Object
- SyntaxNode
- Expression
- UnaryExpression
- AdLint::Cpp::DefinedExpression
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Attributes inherited from UnaryExpression
Attributes inherited from Expression
Instance Method Summary collapse
-
#initialize(val, op, id) ⇒ DefinedExpression
constructor
A new instance of DefinedExpression.
- #inspect(indent = 0) ⇒ Object
- #to_s ⇒ Object
Methods inherited from UnaryExpression
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(val, op, id) ⇒ DefinedExpression
Returns a new instance of DefinedExpression.
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 (readonly)
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 |