class Mint::Ast::ArrayDestructuring
- Mint::Ast::ArrayDestructuring
- Mint::Ast::Node
- Reference
- Object
Defined in:
ast/array_destructuring.crConstructors
Instance Method Summary
-
#covers?(length)
Returns true if the destructuring covers arrays with the given length.
- #items : Array(Mint::Ast::Node)
- #spread?
Instance methods inherited from class Mint::Ast::Node
from : Int32
from,
from=(from : Int32)
from=,
input : Data
input,
location : Location
location,
new_line?
new_line?,
owns?(node)
owns?,
source
source,
static?
static?,
static_value
static_value,
to : Int32
to,
to_tuple
to_tuple
Constructor methods inherited from class Mint::Ast::Node
new(input : Mint::Ast::Data, from : Int32, to : Int32)
new
Constructor Detail
Instance Method Detail
def covers?(length)
#
Returns true if the destructuring covers arrays with the given length.
[x, ...rest] => 1+ [x] => 1 [...rest] => 0+ [] => 0