forked from jasder/antlr
Improve compatibility across contexts: nodejs, web ui and web worker
This commit is contained in:
parent
e7cdc2271f
commit
6c0b7d9c87
|
@ -34,7 +34,7 @@
|
|||
// when you construct the object.
|
||||
//
|
||||
var InputStream = require('./InputStream').InputStream;
|
||||
var isNodeJs = typeof window === 'undefined';
|
||||
var isNodeJs = typeof window === 'undefined' && importScripts === 'undefined';
|
||||
var fs = isNodeJs ? require("fs") : null;
|
||||
|
||||
function FileStream(fileName) {
|
||||
|
|
Loading…
Reference in New Issue