Comparing version 0.15.2-beta to 0.15.3-beta
{ | ||
"name": "razorleaf", | ||
"version": "0.15.2-beta", | ||
"version": "0.15.3-beta", | ||
"main": "razorleaf.js", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -123,3 +123,4 @@ "use strict"; | ||
parent: this.context, | ||
unterminated: this.error("Expected end of string before end of input, starting") | ||
unterminated: this.error("Expected end of string before end of input, starting"), | ||
unexpected: this.error("A string here is not valid") | ||
}; | ||
@@ -137,3 +138,4 @@ this.context.parent.children.push(this.context); | ||
parent: this.context, | ||
unterminated: this.error("Expected end of string before end of input, starting") | ||
unterminated: this.error("Expected end of string before end of input, starting"), | ||
unexpected: this.error("A string here is not valid") | ||
}; | ||
@@ -242,2 +244,3 @@ this.context.parent.children.push(this.context); | ||
this.context.children = []; | ||
this.context.unexpected = this.context.unexpected("An element here is not valid"); | ||
@@ -339,3 +342,3 @@ if(specialBlocks.hasOwnProperty(this.context.name)) { | ||
return function(message) { | ||
return message + location; | ||
return new SyntaxError(message + location); | ||
}; | ||
@@ -342,0 +345,0 @@ }, |
@@ -24,2 +24,10 @@ "use strict"; | ||
for(var i = 0; i < tree.children.length; i++) { | ||
var child = tree.children[i]; | ||
if(child.type !== "extends" && child.type !== "block") { | ||
throw child.unexpected; | ||
} | ||
} | ||
var extendTree = parser.parse(options.include(tree.extends)); | ||
@@ -26,0 +34,0 @@ |
27262
860