Class: AdLint::Cc1::ReturnStatement
- Inherits:
-
JumpStatement
- Object
- SyntaxNode
- Statement
- JumpStatement
- AdLint::Cc1::ReturnStatement
- 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) ⇒ ReturnStatement
constructor
A new instance of ReturnStatement.
- #inspect(indent = 0) ⇒ Object
Methods inherited from JumpStatement
Methods inherited from Statement
Methods inherited from SyntaxNode
#head_location, #location, #short_class_name, #tail_location
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(expr) ⇒ ReturnStatement
Returns a new instance of ReturnStatement.
3947 3948 3949 3950 |
# File 'lib/adlint/cc1/syntax.rb', line 3947 def initialize(expr) super() @expression = expr end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
3952 3953 3954 |
# File 'lib/adlint/cc1/syntax.rb', line 3952 def expression @expression end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
3954 3955 3956 3957 |
# File 'lib/adlint/cc1/syntax.rb', line 3954 def inspect(indent = 0) " " * indent + "#{short_class_name} (#{location.inspect})" + (@expression ? "\n#{@expression.inspect(indent + 1)}" : "") end |