mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-08 23:20:03 +00:00
Keeping JSHint happy
This commit is contained in:
parent
d87d180841
commit
12c6239bf5
@ -22,8 +22,9 @@ var JavaScriptParser = function(options) {
|
|||||||
// Parse a string of JavaScript code or JSON and return the parse tree as a wikitext parse tree
|
// Parse a string of JavaScript code or JSON and return the parse tree as a wikitext parse tree
|
||||||
JavaScriptParser.prototype.parse = function(type,code) {
|
JavaScriptParser.prototype.parse = function(type,code) {
|
||||||
// Try to parse the code
|
// Try to parse the code
|
||||||
|
var parseTree;
|
||||||
try {
|
try {
|
||||||
var parseTree = esprima.parse(code,{comment: true,tokens: true,range: true});
|
parseTree = esprima.parse(code,{comment: true,tokens: true,range: true});
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
// Return a helpful error if the parse failed
|
// Return a helpful error if the parse failed
|
||||||
return new WikiTextParseTree([
|
return new WikiTextParseTree([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user