Skip to content

Commit 85289be

Browse files
committed
Support Expr(:core)
1 parent a90555f commit 85289be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/compat.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,13 @@ function _insert_convert_expr(@nospecialize(e), graph::SyntaxGraph, src::SourceA
397397
@assert nargs === 1 && e.args[1] isa Bool
398398
# TODO: JuliaLowering doesn't accept this (non-:meta) form yet
399399
return (nothing, src)
400+
elseif e.head === :core
401+
@assert nargs === 1
402+
@assert e.args[1] isa Symbol
403+
coreref_name = string(e.args[1])
404+
st_id = _insert_tree_node(graph, K"core", src)
405+
setattr!(graph, st_id; name_val=coreref_name)
406+
return st_id, src
400407
end
401408

402409
# Temporary heads introduced by converting the parent expr

0 commit comments

Comments
 (0)