class Ameba::AST::Argument
- Ameba::AST::Argument
- Reference
- Object
Overview
Represents the argument of some node. Holds the reference to the variable, thus to scope.
For example, all these vars are arguments:
def method(a, b, c = 10, &block)
3.times do |i|
end
->(x : Int32) {}
end
Defined in:
ameba/ast/variabling/argument.crConstructors
-
.new(node : Crystal::ASTNode, variable : Ameba::AST::Variable)
Creates a new argument.
Instance Method Summary
- #end_location(*args, **options)
- #end_location(*args, **options, &)
-
#ignored?
Returns true if the name starts with '_', false if not.
- #location(*args, **options)
- #location(*args, **options, &)
-
#name
Name of the argument.
-
#node : Crystal::Var | Crystal::Arg
The actual node.
- #to_s(*args, **options)
- #to_s(*args, **options, &)
-
#variable : Variable
Variable of this argument (may be the same node)
Constructor Detail
def self.new(node : Crystal::ASTNode, variable : Ameba::AST::Variable)
#
Creates a new argument.
Argument.new(node, variable)