krl-parser
Advanced tools
Comparing version 0.20.3 to 0.20.4
{ | ||
"name": "krl-parser", | ||
"version": "0.20.3", | ||
"version": "0.20.4", | ||
"description": "Parse KRL source code into an AST", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -241,3 +241,3 @@ // Generated automatically by nearley | ||
var tok_LOG_LEVEL_ENUM = defEnum([ | ||
var tok_LOG_or_ERROR_LEVEL_ENUM = defEnum([ | ||
"error", | ||
@@ -326,2 +326,3 @@ "warn", | ||
var tok_description = tok("SYMBOL", "description"); | ||
var tok_error = tok("SYMBOL", "error"); | ||
var tok_errors = tok("SYMBOL", "errors"); | ||
@@ -802,2 +803,3 @@ var tok_event = tok("SYMBOL", "event"); | ||
{"name": "PostludeStatement_core_parts", "symbols": ["LogStatement"], "postprocess": id}, | ||
{"name": "PostludeStatement_core_parts", "symbols": ["ErrorStatement"], "postprocess": id}, | ||
{"name": "PostludeStatement_core_parts", "symbols": ["LastStatement"], "postprocess": id}, | ||
@@ -899,3 +901,3 @@ {"name": "PersistentVariableAssignment$ebnf$1$subexpression$1", "symbols": [tok_OPEN_CURLY, "Expression", tok_CLSE_CURLY]}, | ||
}, | ||
{"name": "LogStatement", "symbols": [tok_log, tok_LOG_LEVEL_ENUM, "Expression"], "postprocess": | ||
{"name": "LogStatement", "symbols": [tok_log, tok_LOG_or_ERROR_LEVEL_ENUM, "Expression"], "postprocess": | ||
function(data){ | ||
@@ -910,2 +912,12 @@ return { | ||
}, | ||
{"name": "ErrorStatement", "symbols": [tok_error, tok_LOG_or_ERROR_LEVEL_ENUM, "Expression"], "postprocess": | ||
function(data){ | ||
return { | ||
loc: mkLoc(data), | ||
type: "ErrorStatement", | ||
level: data[1].src, | ||
expression: data[2] | ||
}; | ||
} | ||
}, | ||
{"name": "LastStatement", "symbols": [tok_last], "postprocess": | ||
@@ -912,0 +924,0 @@ function(data){ |
Sorry, the diff of this file is not supported yet
104764
1484