Skip to content

Commit 98f1b7d

Browse files
committed
kinds: rm unused kind K"inert"
`inert` is mostly used in lowering. As far as I can tell, there is precisely one place in the flisp parser that produces it: https://github.com/JuliaLang/julia/blob/d6b3669621ceb18aea693d8544b2c38870d289ad/src/julia-parser.scm#L1259 However, we do not insert and `inert` there in JuliaSyntax, instead preferring to automatically quote the rhs of a `.` head in expr conversion: https://github.com/JuliaLang/JuliaSyntax.jl/blob/eceaa39706c6ecc3ef496613096216625dba558e/src/expr.jl#L310 As a result, (and as code coverage complains), the syntax head is unused and should be removed here. However, it should probably then be added back in JuliaLowering.
1 parent eceaa39 commit 98f1b7d

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/expr.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,6 @@ function _internal_node_to_Expr(source, srcrange, head, childranges, childheads,
460460
elseif k == K"module"
461461
pushfirst!(args, !has_flags(head, BARE_MODULE_FLAG))
462462
pushfirst!((args[3]::Expr).args, loc)
463-
elseif k == K"inert"
464-
return QuoteNode(only(args))
465463
elseif k == K"quote" && length(args) == 1
466464
a1 = only(args)
467465
if !(a1 isa Expr || a1 isa QuoteNode || a1 isa Bool)

src/kinds.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,6 @@ register_kinds!(JuliaSyntax, 0, [
10151015
"dotcall"
10161016
"comparison"
10171017
"curly"
1018-
"inert" # QuoteNode; not quasiquote
10191018
"juxtapose" # Numeric juxtaposition like 2x
10201019
"string" # A string interior node (possibly containing interpolations)
10211020
"cmdstring" # A cmd string node (containing delimiters plus string)

0 commit comments

Comments
 (0)