Skip to content

Commit 360252f

Browse files
committed
use export_statement when exporting expressions
1 parent 54931b3 commit 360252f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

common/corpus/declarations.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,13 @@ Export assignments
303303
==================================
304304

305305
export = Linter;
306+
export = {};
306307

307308
---
308309

309-
(program (export_statement (identifier)))
310+
(program
311+
(export_statement (identifier))
312+
(export_statement (object)))
310313

311314
==================================
312315
Import aliases

common/define-grammar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ module.exports = function defineGrammar(dialect) {
273273

274274
export_statement: ($, previous) => choice(
275275
previous,
276-
seq('export', 'type', $.export_clause),
277-
seq('export', '=', $.identifier, $._semicolon),
276+
seq('export', 'type', $.export_clause, $._semicolon),
277+
seq('export', '=', $.expression, $._semicolon),
278278
seq('export', 'as', 'namespace', $.identifier, $._semicolon),
279279
),
280280

0 commit comments

Comments
 (0)