We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce9fec1 commit 7ae0774Copy full SHA for 7ae0774
test/index.ts
@@ -2399,6 +2399,20 @@ describe('Location', () => {
2399
if (!node.loc) assert.fail();
2400
assert.deepEqual(node.loc, { start: 3, end: 13 });
2401
});
2402
+ test.concurrent('comment', async () => {
2403
+ let node: Ast.Node;
2404
+ const parser = new Parser();
2405
+ const nodes = parser.parse(`
2406
+ /*
2407
+ */
2408
+ // hoge
2409
+ @f(a) { a }
2410
+ `);
2411
+ assert.equal(nodes.length, 1);
2412
+ node = nodes[0];
2413
+ if (!node.loc) assert.fail();
2414
+ assert.deepEqual(node.loc, { start: 23, end: 33 });
2415
+ });
2416
2417
2418
describe('Variable declaration', () => {
0 commit comments