Skip to content

Commit f0d609c

Browse files
SijaRX14
authored andcommittedOct 6, 2017
Document ASTNode#symbolize (#5081)
1 parent bdd038d commit f0d609c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

Diff for: ‎src/compiler/crystal/macros.cr

+8
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ module Crystal::Macros
153153
def stringify : StringLiteral
154154
end
155155

156+
# Returns a `SymbolLiteral` that contains this node's textual representation.
157+
#
158+
# ```
159+
# {{ "foo".id.symbolize }} # => :foo
160+
# ```
161+
def symbolize : SymbolLiteral
162+
end
163+
156164
# Returns a `StringLiteral` that contains this node's name.
157165
#
158166
# ```

0 commit comments

Comments
 (0)
Please sign in to comment.