From 6f83679dff9ec1e22da5a92b3fc6f5e032386cb8 Mon Sep 17 00:00:00 2001 From: Chengyu Han Date: Mon, 27 Jan 2025 11:31:01 +0800 Subject: [PATCH] Rename haschildren() to is_leaf() https://github.com/JuliaLang/JuliaSyntax.jl/pull/483 --- src/JuliaSyntaxHighlighting.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JuliaSyntaxHighlighting.jl b/src/JuliaSyntaxHighlighting.jl index 6a31e09..01a0d7f 100644 --- a/src/JuliaSyntaxHighlighting.jl +++ b/src/JuliaSyntaxHighlighting.jl @@ -195,7 +195,7 @@ function _hl_annotations!(highlights::Vector{@NamedTuple{region::UnitRange{Int}, !JuliaSyntax.is_prec_assignment(node) && !JuliaSyntax.is_word_operator(node) && nkind != K"." && nkind != K"..." && - (JuliaSyntax.is_trivia(node) || !JuliaSyntax.haschildren(node)) + (JuliaSyntax.is_trivia(node) || JuliaSyntax.is_leaf(node)) face = if nkind == K"Identifier" if pkind == K"curly" :julia_type