forked from jasder/antlr
Merge pull request #1103 from ericvergnaud/master
latest version of honey-require
This commit is contained in:
commit
d0fb48c2b8
|
@ -1258,10 +1258,10 @@ ParserATNSimulator.prototype.closureCheckingStopState = function(config, configs
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
returnState = this.atn.states[config.context.getReturnState(i)];
|
var returnState = this.atn.states[config.context.getReturnState(i)];
|
||||||
newContext = config.context.getParent(i); // "pop" return state
|
var newContext = config.context.getParent(i); // "pop" return state
|
||||||
var parms = {state:returnState, alt:config.alt, context:newContext, semanticContext:config.semanticContext};
|
var parms = {state:returnState, alt:config.alt, context:newContext, semanticContext:config.semanticContext};
|
||||||
c = new ATNConfig(parms, null);
|
var c = new ATNConfig(parms, null);
|
||||||
// While we have context to pop back from, we may have
|
// While we have context to pop back from, we may have
|
||||||
// gotten that context AFTER having falling off a rule.
|
// gotten that context AFTER having falling off a rule.
|
||||||
// Make sure we track that we are now out of context.
|
// Make sure we track that we are now out of context.
|
||||||
|
|
|
@ -62,7 +62,13 @@
|
||||||
// anchor element as parser in that case. Thes breaks web worker support,
|
// anchor element as parser in that case. Thes breaks web worker support,
|
||||||
// but we don't care since these browsers also don't support web workers.
|
// but we don't care since these browsers also don't support web workers.
|
||||||
|
|
||||||
var parser = URL ? new URL(location.href) : document.createElement('A');
|
try {
|
||||||
|
var parser = new URL(location.href);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.warn("Honey: falling back to DOM workaround for URL parser ("+e+")");
|
||||||
|
parser = document.createElement('A');
|
||||||
|
}
|
||||||
|
|
||||||
// INFO Module cache
|
// INFO Module cache
|
||||||
// Contains getter functions for the exports objects of all the loaded
|
// Contains getter functions for the exports objects of all the loaded
|
||||||
|
@ -81,7 +87,7 @@
|
||||||
delete cache.foo;
|
delete cache.foo;
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
console.warn("Honey: falling back to DOM workaround for defineProperty ("+e+")");
|
console.warn("Honey: falling back to DOM workaround for cache object ("+e+")");
|
||||||
cache = document.createElement('DIV');
|
cache = document.createElement('DIV');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue