diff --git a/driver.html b/driver.html index a859ea34272d7e0279a3b9518c46e2ef7ecb6580..1f374fbef0e98dad1b60d69ad9ca44a1461e6239 100644 --- a/driver.html +++ b/driver.html @@ -4,10 +4,10 @@ <meta charset="utf-8"> <title>JavaScript Reference Tracer</title> -<script src="../../interp/tracer/jquery-2.1.1.min.js"></script> +<script src="../interp/tracer/jquery-2.1.1.min.js"></script> -<link rel=stylesheet href="../../interp/tracer/codemirror/lib/codemirror.css"> -<script src="../../interp/tracer/codemirror/lib/codemirror.js"></script> +<link rel=stylesheet href="../interp/tracer/codemirror/lib/codemirror.css"> +<script src="../interp/tracer/codemirror/lib/codemirror.js"></script> <!-- styles needed by jScrollPane - include in your own sites --> diff --git a/esprima-to-ast.js b/esprima-to-ast.js index e86aaf8bca7157a1b97dab3f066cef025c927f27..44ade7325e0c31ea46c7f850dcfca28f079bd374 100644 --- a/esprima-to-ast.js +++ b/esprima-to-ast.js @@ -616,8 +616,12 @@ function NewASTErrorType(name, parentError) { var EsprimaToASTError = NewASTErrorType("EsprimaToASTError", Error); var UnsupportedSyntaxError = NewASTErrorType("UnsupportedSyntaxError", EsprimaToASTError); -// For testing purposes with node -module.exports.esprimaToAST = esprimaToAST; -module.exports.EsprimaToASTError = EsprimaToASTError; -module.exports.UnsupportedSyntaxError = UnsupportedSyntaxError; -module.exports.toString = toString; +try { + // For testing purposes with node + module.exports.esprimaToAST = esprimaToAST; + module.exports.EsprimaToASTError = EsprimaToASTError; + module.exports.UnsupportedSyntaxError = UnsupportedSyntaxError; + module.exports.toString = toString; +} catch (e) { + // Ignore these, as we're not using node +} diff --git a/navig-poc.html b/navig-poc.html index 54c770159d0577b3056ad87dd0c4331e54ad2bf8..9a168f81ae193cb12323be7654f343f9b4a6fa6a 100644 --- a/navig-poc.html +++ b/navig-poc.html @@ -6,10 +6,10 @@ -<script src="../../interp/tracer/jquery-2.1.1.min.js"></script> +<script src="../interp/tracer/jquery-2.1.1.min.js"></script> -<link rel=stylesheet href="../../interp/tracer/codemirror/lib/codemirror.css"> -<script src="../../interp/tracer/codemirror/lib/codemirror.js"></script> +<link rel=stylesheet href="../interp/tracer/codemirror/lib/codemirror.css"> +<script src="../interp/tracer/codemirror/lib/codemirror.js"></script> <!-- styles needed by jScrollPane - include in your own sites --> diff --git a/navig.html b/navig.html index 4fd9701e56ba9ffa241b44bf0e106b793891dc78..7e49b215b8b4bc3be1c7f7c9d2aac21c4ad34fc5 100644 --- a/navig.html +++ b/navig.html @@ -8,10 +8,10 @@ -<script src="../../interp/tracer/jquery-2.1.1.min.js"></script> +<script src="../interp/tracer/jquery-2.1.1.min.js"></script> -<link rel=stylesheet href="../../interp/tracer/codemirror/lib/codemirror.css"> -<script src="../../interp/tracer/codemirror/lib/codemirror.js"></script> +<link rel=stylesheet href="../interp/tracer/codemirror/lib/codemirror.css"> +<script src="../interp/tracer/codemirror/lib/codemirror.js"></script> <!-- styles needed by jScrollPane - include in your own sites -->