From cd82f1e888ef56e396dbb4132aecf698118f929c Mon Sep 17 00:00:00 2001 From: RblSb Date: Tue, 29 Oct 2024 09:35:05 +0300 Subject: [PATCH] Use getPOpenType --- .../features/haxe/codeAction/TokenTreeUtils.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/haxeLanguageServer/features/haxe/codeAction/TokenTreeUtils.hx b/src/haxeLanguageServer/features/haxe/codeAction/TokenTreeUtils.hx index 4f8b8756..4b461091 100644 --- a/src/haxeLanguageServer/features/haxe/codeAction/TokenTreeUtils.hx +++ b/src/haxeLanguageServer/features/haxe/codeAction/TokenTreeUtils.hx @@ -1,6 +1,7 @@ package haxeLanguageServer.features.haxe.codeAction; import tokentree.TokenTree; +import tokentree.utils.TokenTreeCheckUtils; class TokenTreeUtils { public static function isInFunctionScope(token:TokenTree):Bool { @@ -23,8 +24,7 @@ class TokenTreeUtils { public static function isCallPOpen(pOpen:TokenTree):Bool { if (pOpen.tok != POpen) return false; - final name = pOpen.parent ?? return false; - return name.tok.match(Const(CIdent(_))); + return TokenTreeCheckUtils.getPOpenType(pOpen) == Call; } public static function isFunctionArg(token:TokenTree):Bool {