Skip to content

Commit

Permalink
Use getPOpenType
Browse files Browse the repository at this point in the history
  • Loading branch information
RblSb committed Oct 29, 2024
1 parent dbb7ef1 commit cd82f1e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit cd82f1e

Please sign in to comment.