Skip to content

Commit 68a9031

Browse files
committed
Include type parameters to ensure concrete types
It had escaped me that GreenNode isn't actually a concrete type.
1 parent 595728b commit 68a9031

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/JuliaSyntaxHighlighting.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ end
157157
ParenDepthCounter() =
158158
ParenDepthCounter(zero(UInt), zero(UInt), zero(UInt))
159159

160-
struct GreenLineage
161-
node::GreenNode
162-
parent::Union{Nothing, GreenLineage}
160+
struct GreenLineage{H}
161+
node::GreenNode{H}
162+
parent::Union{Nothing, GreenLineage{H}}
163163
end
164164

165-
struct HighlightContext{S <: AbstractString}
165+
struct HighlightContext{H, S <: AbstractString}
166166
content::S
167167
offset::UInt
168-
lnode::GreenNode
168+
lnode::GreenNode{H}
169169
pdepths::ParenDepthCounter
170170
end
171171

0 commit comments

Comments
 (0)