Class: AdLint::Cpp::GroupedExpression
- Inherits:
-
PrimaryExpression
- Object
- SyntaxNode
- Expression
- PrimaryExpression
- AdLint::Cpp::GroupedExpression
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Attributes inherited from Expression
Instance Method Summary collapse
-
#initialize(val, expr) ⇒ GroupedExpression
constructor
A new instance of GroupedExpression.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
- #to_s ⇒ Object
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(val, expr) ⇒ GroupedExpression
Returns a new instance of GroupedExpression.
766 767 768 769 |
# File 'lib/adlint/cpp/syntax.rb', line 766 def initialize(val, expr) super(val) @expression = expr end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
771 772 773 |
# File 'lib/adlint/cpp/syntax.rb', line 771 def expression @expression end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
781 782 783 784 |
# File 'lib/adlint/cpp/syntax.rb', line 781 def inspect(indent = 0) " " * indent + "#{short_class_name}\n" + @expression.inspect(indent + 1) end |
#location ⇒ Object
773 774 775 |
# File 'lib/adlint/cpp/syntax.rb', line 773 def location @expression.location end |
#to_s ⇒ Object
777 778 779 |
# File 'lib/adlint/cpp/syntax.rb', line 777 def to_s "(#{@expression.to_s})" end |