MCPcopy
hub / github.com/ajaxorg/ace / completeExpr

Function completeExpr

lib/ace/mode/xquery/xqlint.js:1589–1600  ·  view source on GitHub ↗
(line, pos, sctx)

Source from the content-addressed store, hash-verified

1587};
1588
1589var completeExpr = function(line, pos, sctx){
1590 var identifier = retrievePrecedingIdentifier(line, pos.col, nameCharRegExp);
1591 var before = line.substring(0, pos.col - (identifier.length === 0 ? 0 : identifier.length));
1592 var isVar = before[before.length - 1] === '$';
1593 if(isVar) {
1594 return completeVariable(identifier, pos, sctx);
1595 } else if(identifier !== '') {
1596 return completeFunction(identifier, pos, sctx).concat(completePrefix(identifier, pos, sctx));
1597 } else {
1598 return completeVariable(identifier, pos, sctx).concat(completeFunction(identifier, pos, sctx)).concat(completePrefix(identifier, pos, sctx));
1599 }
1600};
1601
1602var completeModuleUri = function(line, pos, sctx){
1603 var identifier = retrievePrecedingIdentifier(line, pos.col, uriRegex);

Callers 1

xqlint.jsFile · 0.85

Calls 5

completeVariableFunction · 0.85
completeFunctionFunction · 0.85
completePrefixFunction · 0.85
substringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…