Class: AdLint::Cc1::ExpressionStatement
- Inherits:
-
Statement
- Object
- SyntaxNode
- Statement
- AdLint::Cc1::ExpressionStatement
- Defined in:
- lib/adlint/cc1/syntax.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Attributes inherited from Statement
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary collapse
-
#initialize(expr) ⇒ ExpressionStatement
constructor
A new instance of ExpressionStatement.
- #inspect(indent = 0) ⇒ Object
- #location ⇒ Object
Methods inherited from Statement
Methods inherited from SyntaxNode
#head_location, #short_class_name, #tail_location
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(expr) ⇒ ExpressionStatement
Returns a new instance of ExpressionStatement.
3468 3469 3470 3471 |
# File 'lib/adlint/cc1/syntax.rb', line 3468 def initialize(expr) super() @expression = expr end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
3473 3474 3475 |
# File 'lib/adlint/cc1/syntax.rb', line 3473 def expression @expression end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
3479 3480 3481 3482 |
# File 'lib/adlint/cc1/syntax.rb', line 3479 def inspect(indent = 0) " " * indent + "#{short_class_name}" + (@expression ? "\n#{@expression.inspect(indent + 1)}" : "") end |
#location ⇒ Object
3475 3476 3477 |
# File 'lib/adlint/cc1/syntax.rb', line 3475 def location head_location end |