Class: LibRubyParser::Nodes::Args
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Args
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents an arguments list
Args(vec![Arg("a"), Optarg("b", Int("1"))])
in def m(a, b = 1); end
Instance Attribute Summary collapse
-
#args ⇒ ::Array<Node>
readonly
List of arguments.
-
#begin_l ⇒ Loc?
readonly
Location of the open parenthesis.
-
#end_l ⇒ Loc?
readonly
Location of the closing parenthesis.
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
Instance Attribute Details
#args ⇒ ::Array<Node> (readonly)
List of arguments
135 136 137 |
# File 'lib/lib-ruby-parser/nodes.rb', line 135 def args @args end |
#begin_l ⇒ Loc? (readonly)
Location of the open parenthesis
def m(a, b = 1, c:, &blk); end
~
None
for code like def m; end
or def m arg; end
155 156 157 |
# File 'lib/lib-ruby-parser/nodes.rb', line 155 def begin_l @begin_l end |
#end_l ⇒ Loc? (readonly)
Location of the closing parenthesis
def m(a, b = 1, c:, &blk); end
~
None
for code like def m; end
or def m arg; end
166 167 168 |
# File 'lib/lib-ruby-parser/nodes.rb', line 166 def end_l @end_l end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
def m(a, b = 1, c:, &blk); end
~~~~~~~~~~~~~~~~~~~~
144 145 146 |
# File 'lib/lib-ruby-parser/nodes.rb', line 144 def expression_l @expression_l end |