|
|
@ -33,7 +33,7 @@ function reportDuplicateLabels(ast) {
|
|
|
|
action: checkExpressionWithClonedEnv,
|
|
|
|
action: checkExpressionWithClonedEnv,
|
|
|
|
|
|
|
|
|
|
|
|
labeled(node, env) {
|
|
|
|
labeled(node, env) {
|
|
|
|
if (env.hasOwnProperty(node.label)) {
|
|
|
|
if (Object.prototype.hasOwnProperty.call(env, node.label)) {
|
|
|
|
throw new GrammarError(
|
|
|
|
throw new GrammarError(
|
|
|
|
"Label \"" + node.label + "\" is already defined "
|
|
|
|
"Label \"" + node.label + "\" is already defined "
|
|
|
|
+ "at line " + env[node.label].start.line + ", "
|
|
|
|
+ "at line " + env[node.label].start.line + ", "
|
|
|
|