File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -2178,4 +2178,11 @@ The base library of Julia. `Base` is a module that contains basic functionality
2178
2178
"""
2179
2179
Base. Base
2180
2180
2181
+ """
2182
+ QuoteNode
2183
+
2184
+ A quoted piece of code, that does not support interpolation. See the [manual section about QuoteNodes](@ref man-quote-node) for details.
2185
+ """
2186
+ QuoteNode
2187
+
2181
2188
end
Original file line number Diff line number Diff line change @@ -397,6 +397,7 @@ Meta.@lower
397
397
Meta.parse(::AbstractString, ::Int)
398
398
Meta.parse(::AbstractString)
399
399
Meta.ParseError
400
+ Core.QuoteNode
400
401
Base.macroexpand
401
402
Base.@macroexpand
402
403
Base.@macroexpand1
Original file line number Diff line number Diff line change @@ -328,9 +328,15 @@ Expr
328
328
As we have seen, such expressions support interpolation with ` $ ` .
329
329
However, in some situations it is necessary to quote code * without* performing interpolation.
330
330
This kind of quoting does not yet have syntax, but is represented internally
331
- as an object of type ` QuoteNode ` .
332
- The parser yields ` QuoteNode ` s for simple quoted items like symbols:
331
+ as an object of type ` QuoteNode ` :
332
+ ``` jldoctest interp1
333
+ julia> quot(Expr(:$, :(1+2))) |> eval
334
+ 3
333
335
336
+ julia> QuoteNode(Expr(:$, :(1+2))) |> eval
337
+ :($(Expr(:$, :(1 + 2))))
338
+ ```
339
+ The parser yields ` QuoteNode ` s for simple quoted items like symbols:
334
340
``` jldoctest interp1
335
341
julia> dump(Meta.parse(":x"))
336
342
QuoteNode
You can’t perform that action at this time.
0 commit comments