Skip to content

Commit

Permalink
Macro: add missing document for ArrayLiteral#push and #unshift (#6232)
Browse files Browse the repository at this point in the history
  • Loading branch information
makenowjust authored and bcardiff committed Jun 21, 2018
1 parent 666c192 commit fd628c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/compiler/crystal/macros.cr
Expand Up @@ -610,6 +610,18 @@ module Crystal::Macros
def []=(index : NumberLiteral, value : ASTNode)
end

# Similar to `Array#unshift`.
def unshift : ArrayLiteral
end

# Similar to `Array#push`.
def push(value : ASTNode) : ArrayLiteral
end

# Similar to `Array#<<`.
def <<(value : ASTNode) : ArrayLiteral
end

# Similar to `Array#+`.
def +(other : ArrayLiteral) : ArrayLiteral
end
Expand Down

0 comments on commit fd628c9

Please sign in to comment.