@@ -108,6 +108,7 @@ export class Data {
108108 public static separators = [ '!' , '*' , '+' , ',' , '-' , '.' , '/' , ':' , '<' , '=' , '>' , '?' , '|' , '%' ] ;
109109 public static completionTriggers = [ '"' , '!' , '*' , '+' , ',' , '/' , '=' , '|' , '(' , '[' , '{' ] ;
110110 public static estimatorSeparators = Data . separators . concat ( [ '(' , ')' , '[' , ']' , '{' , '}' , '\'' , '"' ] ) ;
111+ public static readonly fnTypes = [ 'map' , 'array' , 'function' , 'record' ] ;
111112
112113 public static doubleSeps = [ '!=' , '*:' , '..' , '//' , '::' , ':=' , '->' , '<<' , '<=' , '=>' , '>=' , '>>' , '||' , '!!' , '??' ] ;
113114 public static anySeps = [ '=' , ':' , '.' , '/' , '=' , '<' , '>' , '|' , '!' , '*' , '+' , ',' , '-' , '.' , '?' , '[' ] ;
@@ -1095,7 +1096,7 @@ export class XPathLexer {
10951096 if ( currentToken . value === ':*' || currentToken . value === '..' ) {
10961097 currentToken . charType = CharLevelState . lName ;
10971098 currentToken . tokenType = TokenLevelState . nodeType ;
1098- } else if ( currentToken . value === '()' && prevToken . tokenType === TokenLevelState . nodeType ) {
1099+ } else if ( currentToken . value === '()' && prevToken . tokenType === TokenLevelState . nodeType && ! Data . fnTypes . includes ( prevToken . value ) ) {
10991100 currentToken . charType = CharLevelState . lName ;
11001101 currentToken . tokenType = TokenLevelState . nodeType ;
11011102 }
0 commit comments