Skip to content

Commit

Permalink
Use Mustache loc instead of path
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Mar 25, 2024
1 parent 6d4f7b9 commit 97bdac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export abstract class HandlebarsNodeVisitors extends Parser {
if ('original' in rawMustache.path && rawMustache.path.original === '...attributes') {
throw generateSyntaxError(
'Illegal use of ...attributes',
this.source.spanFor(rawMustache.path.loc)
this.source.spanFor(rawMustache.loc)
);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/@glimmer/syntax/test/parser-node-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ test('attributes are not allowed as values', (assert) => {
() => {
parse(t, { meta: { moduleName: 'test-module' } });
},
syntaxErrorFor('Illegal use of ...attributes', '...attributes', 'test-module', 1, 2)
syntaxErrorFor('Illegal use of ...attributes', '{{...attributes}}', 'test-module', 1, 0)
);
});

Expand All @@ -137,7 +137,7 @@ test('attributes are not allowed as modifiers', (assert) => {
() => {
parse(t, { meta: { moduleName: 'test-module' } });
},
syntaxErrorFor('Illegal use of ...attributes', '...attributes', 'test-module', 1, 7)
syntaxErrorFor('Illegal use of ...attributes', '{{...attributes}}', 'test-module', 1, 5)
);
});

Expand All @@ -147,7 +147,7 @@ test('attributes are not allowed as attribute values', (assert) => {
() => {
parse(t, { meta: { moduleName: 'test-module' } });
},
syntaxErrorFor('Illegal use of ...attributes', '...attributes', 'test-module', 1, 13)
syntaxErrorFor('Illegal use of ...attributes', '{{...attributes}}', 'test-module', 1, 11)
);
});

Expand Down

0 comments on commit 97bdac0

Please sign in to comment.