Skip to content

Commit 59ee6b3

Browse files
committed
Use LAL API to check if a token is trivia
1 parent 8ad1aa8 commit 59ee6b3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/ada/lsp-utils.adb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,7 @@ package body LSP.Utils is
490490
Result : Token_Reference :=
491491
(if Token = No_Token then No_Token else Previous (Token))
492492
do
493-
while Result /= No_Token
494-
and then Kind (Data (Result)) in Ada_Whitespace | Ada_Comment
493+
while Result /= No_Token and then Libadalang.Common.Is_Trivia (Result)
495494
loop
496495
Result := Previous (Result);
497496
end loop;

0 commit comments

Comments
 (0)