Skip to content

Commit

Permalink
Re-add typeassert highlighting (#322)
Browse files Browse the repository at this point in the history
See issue #317
  • Loading branch information
jakobnissen authored Jun 29, 2024
1 parent 091b2b7 commit 4d3bac0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/passes/SyntaxHighlighter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,12 @@ function (highlighter::SyntaxHighlighterSettings)(crayons::Vector{Crayon}, token
prev_t = Token()
pprev_t = Token()
for (i, t) in enumerate(tokens)
if JuliaSyntax.is_error(t)
crayons[i] = cscheme.error
# a::x
#=
if kind(prev_t) == Tokens.DECLARATION
elseif kind(t) == K"Identifier" && kind(prev_t) == K"::"
crayons[i-1] = cscheme.argdef
crayons[i] = cscheme.argdef
=#
if JuliaSyntax.is_error(t)
crayons[i] = cscheme.error
# :foo
elseif kind(t) == K"Identifier" && kind(prev_t) == K":" &&
kind(pprev_t) (K"Integer", K"Float", K"Identifier", K")")
Expand Down

0 comments on commit 4d3bac0

Please sign in to comment.