Merge pull request #2246 from wcandillon/patch-1
Disable module resolver
This commit is contained in:
commit
38ed6de508
2 changed files with 36 additions and 37 deletions
|
|
@ -1,6 +1,6 @@
|
|||
define(function(require, exports, module) {
|
||||
module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
|
||||
1:[function(_dereq_,module,exports){
|
||||
module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
|
||||
1:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var init = function(that, code, message, pos, type){
|
||||
|
|
@ -43,11 +43,11 @@ exports.StaticWarning = StaticWarning.prototype.constructor = function(code, mes
|
|||
};
|
||||
},
|
||||
{}],
|
||||
2:[function(_dereq_,module,exports){
|
||||
2:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var TreeOps = _dereq_('../tree_ops').TreeOps;
|
||||
var Errors = _dereq_('./errors');
|
||||
var TreeOps = require('../tree_ops').TreeOps;
|
||||
var Errors = require('./errors');
|
||||
var StaticWarning = Errors.StaticWarning;
|
||||
|
||||
//
|
||||
|
|
@ -216,7 +216,7 @@ exports.FunctionCallHandler = function(translator, sctx, node, arity){
|
|||
*/
|
||||
},
|
||||
{"../tree_ops":11,"./errors":1}],
|
||||
3:[function(_dereq_,module,exports){
|
||||
3:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
|
|
@ -276,17 +276,17 @@ exports.getSchemaBuiltinTypes = function(){
|
|||
};
|
||||
},
|
||||
{}],
|
||||
4:[function(_dereq_,module,exports){
|
||||
4:[function(require,module,exports){
|
||||
exports.StaticContext = function (parent, pos) {
|
||||
'use strict';
|
||||
|
||||
var TreeOps = _dereq_('../tree_ops').TreeOps;
|
||||
var TreeOps = require('../tree_ops').TreeOps;
|
||||
|
||||
var Errors = _dereq_('./errors');
|
||||
var Errors = require('./errors');
|
||||
var StaticError = Errors.StaticError;
|
||||
var StaticWarning = Errors.StaticWarning;
|
||||
|
||||
var getSchemaBuiltinTypes = _dereq_('./schema_built-in_types').getSchemaBuiltinTypes;
|
||||
var getSchemaBuiltinTypes = require('./schema_built-in_types').getSchemaBuiltinTypes;
|
||||
|
||||
var emptyPos = { sl:0, sc: 0, el: 0, ec: 0 };
|
||||
var namespaces = {};
|
||||
|
|
@ -725,17 +725,17 @@ exports.StaticContext = function (parent, pos) {
|
|||
|
||||
},
|
||||
{"../tree_ops":11,"./errors":1,"./schema_built-in_types":3}],
|
||||
5:[function(_dereq_,module,exports){
|
||||
5:[function(require,module,exports){
|
||||
exports.Translator = function(rootStcx, ast){
|
||||
'use strict';
|
||||
|
||||
var Errors = _dereq_('./errors');
|
||||
var Errors = require('./errors');
|
||||
var StaticError = Errors.StaticError;
|
||||
var StaticWarning = Errors.StaticWarning;
|
||||
|
||||
var TreeOps = _dereq_('../tree_ops').TreeOps;
|
||||
var StaticContext = _dereq_('./static_context').StaticContext;
|
||||
var Handlers = _dereq_('./handlers');
|
||||
var TreeOps = require('../tree_ops').TreeOps;
|
||||
var StaticContext = require('./static_context').StaticContext;
|
||||
var Handlers = require('./handlers');
|
||||
|
||||
var get = function(node, path){
|
||||
var result = [];
|
||||
|
|
@ -1178,7 +1178,7 @@ exports.Translator = function(rootStcx, ast){
|
|||
pushSctx(node.pos);
|
||||
quantifiedDecls.push(0);
|
||||
this.visitChildren(node);
|
||||
for(var i=1; i <= quantifiedDecls[clauses.length - 1]; i++) {
|
||||
for(var i=1; i <= quantifiedDecls[quantifiedDecls.length - 1]; i++) {
|
||||
popSctx(node.pos);
|
||||
}
|
||||
quantifiedDecls.pop();
|
||||
|
|
@ -1305,10 +1305,10 @@ exports.Translator = function(rootStcx, ast){
|
|||
|
||||
},
|
||||
{"../tree_ops":11,"./errors":1,"./handlers":2,"./static_context":4}],
|
||||
6:[function(_dereq_,module,exports){
|
||||
6:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var TreeOps = _dereq_('../tree_ops').TreeOps;
|
||||
var TreeOps = require('../tree_ops').TreeOps;
|
||||
|
||||
var ID_REGEX = /[a-zA-Z_0-9\$]/;
|
||||
|
||||
|
|
@ -1561,7 +1561,7 @@ exports.complete = function(source, ast, rootSctx, pos){
|
|||
|
||||
},
|
||||
{"../tree_ops":11}],
|
||||
7:[function(_dereq_,module,exports){
|
||||
7:[function(require,module,exports){
|
||||
exports.StyleChecker = function (ast, source) {
|
||||
'use strict';
|
||||
|
||||
|
|
@ -1690,7 +1690,7 @@ exports.StyleChecker = function (ast, source) {
|
|||
};
|
||||
},
|
||||
{}],
|
||||
8:[function(_dereq_,module,exports){
|
||||
8:[function(require,module,exports){
|
||||
exports.JSONParseTreeHandler = function (code) {
|
||||
'use strict';
|
||||
|
||||
|
|
@ -1856,7 +1856,7 @@ exports.JSONParseTreeHandler = function (code) {
|
|||
};
|
||||
},
|
||||
{}],
|
||||
9:[function(_dereq_,module,exports){
|
||||
9:[function(require,module,exports){
|
||||
// This file was generated on Thu Jul 24, 2014 15:00 (UTC+01) by REx v5.30 which is Copyright (c) 1979-2014 by Gunther Rademacher <grd@gmx.net>
|
||||
// REx command line: JSONiqParser.ebnf -ll 2 -backtrack -tree -javascript -a xqlint
|
||||
|
||||
|
|
@ -44140,7 +44140,7 @@ JSONiqParser.TOKEN =
|
|||
|
||||
},
|
||||
{}],
|
||||
10:[function(_dereq_,module,exports){
|
||||
10:[function(require,module,exports){
|
||||
// This file was generated on Thu Jul 24, 2014 15:00 (UTC+01) by REx v5.30 which is Copyright (c) 1979-2014 by Gunther Rademacher <grd@gmx.net>
|
||||
// REx command line: XQueryParser.ebnf -ll 2 -backtrack -tree -javascript -a xqlint
|
||||
|
||||
|
|
@ -78693,7 +78693,7 @@ XQueryParser.TOKEN =
|
|||
|
||||
},
|
||||
{}],
|
||||
11:[function(_dereq_,module,exports){
|
||||
11:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
exports.TreeOps = {
|
||||
|
|
@ -78786,18 +78786,18 @@ exports.TreeOps = {
|
|||
};
|
||||
},
|
||||
{}],
|
||||
12:[function(_dereq_,module,exports){
|
||||
12:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var JSONiqParser = _dereq_('./parsers/JSONiqParser').JSONiqParser;
|
||||
var XQueryParser = _dereq_('./parsers/XQueryParser').XQueryParser;
|
||||
var JSONParseTreeHandler = _dereq_('./parsers/JSONParseTreeHandler').JSONParseTreeHandler;
|
||||
var Translator = _dereq_('./compiler/translator').Translator;
|
||||
var StyleChecker = _dereq_('./formatter/style_checker').StyleChecker;
|
||||
var completer = _dereq_('../lib/completion/completer');
|
||||
var JSONiqParser = require('./parsers/JSONiqParser').JSONiqParser;
|
||||
var XQueryParser = require('./parsers/XQueryParser').XQueryParser;
|
||||
var JSONParseTreeHandler = require('./parsers/JSONParseTreeHandler').JSONParseTreeHandler;
|
||||
var Translator = require('./compiler/translator').Translator;
|
||||
var StyleChecker = require('./formatter/style_checker').StyleChecker;
|
||||
var completer = require('../lib/completion/completer');
|
||||
|
||||
var createStaticContext = exports.createStaticContext = function(){
|
||||
var StaticContext = _dereq_('./compiler/static_context').StaticContext;
|
||||
var StaticContext = require('./compiler/static_context').StaticContext;
|
||||
return new StaticContext();
|
||||
};
|
||||
|
||||
|
|
@ -78906,7 +78906,6 @@ exports.XQLint = function (source, opts) {
|
|||
};
|
||||
|
||||
},
|
||||
{"../lib/completion/completer":6,"./compiler/static_context":4,"./compiler/translator":5,"./formatter/style_checker":7,"./parsers/JSONParseTreeHandler":8,"./parsers/JSONiqParser":9,"./parsers/XQueryParser":10}]},{},[12])
|
||||
(12)
|
||||
{"../lib/completion/completer":6,"./compiler/static_context":4,"./compiler/translator":5,"./formatter/style_checker":7,"./parsers/JSONParseTreeHandler":8,"./parsers/JSONiqParser":9,"./parsers/XQueryParser":10}]},{},[12])(12)
|
||||
|
||||
});
|
||||
|
|
@ -35,7 +35,7 @@ var oop = require("../lib/oop");
|
|||
var Mirror = require("../worker/mirror").Mirror;
|
||||
var XQLintLib = require("./xquery/xqlint");
|
||||
var XQLint = XQLintLib.XQLint;
|
||||
var Modules = require("./xquery/modules").Modules;
|
||||
//var Modules = require("./xquery/modules").Modules;
|
||||
|
||||
var getModuleResolverFromModules = function(modules){
|
||||
return function(uri){
|
||||
|
|
@ -68,8 +68,8 @@ var XQueryWorker = exports.XQueryWorker = function(sender) {
|
|||
this.opts = {
|
||||
styleCheck: false
|
||||
};
|
||||
this.availableModuleNamespaces = Object.keys(Modules);
|
||||
this.moduleResolver = getModuleResolverFromModules(Modules);
|
||||
//this.availableModuleNamespaces = Object.keys(Modules);
|
||||
//this.moduleResolver; = getModuleResolverFromModules(Modules);
|
||||
var that = this;
|
||||
|
||||
this.sender.on("complete", function(e){
|
||||
|
|
@ -105,7 +105,7 @@ oop.inherits(XQueryWorker, Mirror);
|
|||
}
|
||||
var opts = {
|
||||
styleCheck: this.styleCheck,
|
||||
staticContext: sctx,
|
||||
staticContext: sctx
|
||||
};
|
||||
this.xqlint = new XQLint(value, opts);
|
||||
this.sender.emit("markers", this.xqlint.getMarkers());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue