From 0123976d8a5533a2cab1908f3b1e64c15f525262 Mon Sep 17 00:00:00 2001 From: Quinton Miller Date: Fri, 10 Jun 2022 03:35:04 +0800 Subject: [PATCH] Document `Crystal::Macros::Self` and `Underscore` (#12085) --- src/compiler/crystal/macros.cr | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/compiler/crystal/macros.cr b/src/compiler/crystal/macros.cr index 63db01ce78a0..c1123ddbc787 100644 --- a/src/compiler/crystal/macros.cr +++ b/src/compiler/crystal/macros.cr @@ -1586,8 +1586,10 @@ module Crystal::Macros end end - # class Self < ASTNode - # end + # The `self` expression. May appear in code, such as in an instance method, + # and in type names. + class Self < ASTNode + end # The base class of control expressions. abstract class ControlExpression < ASTNode @@ -1717,8 +1719,10 @@ module Crystal::Macros # class MacroFor < ASTNode # end - # class Underscore < ASTNode - # end + # The `_` expression. May appear in code, such as an assignment target, and in + # type names. + class Underscore < ASTNode + end # class MagicConstant < ASTNode # end