Skip to content

Commit 4fe6f05

Browse files
committed
🎨 Improve line length
1 parent eb2b798 commit 4fe6f05

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/Language/JavaScript/Parser/Grammar7.y

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,30 +1166,38 @@ Program : StatementList Eof { AST.JSAstProgram $1 $2 {- 'Program1' -} }
11661166
-- [ ] export default ClassDeclaration[Default]
11671167
-- [ ] export default [lookahead ∉ { function, class }] AssignmentExpression[In] ;
11681168
ExportDeclaration :: { AST.JSStatement }
1169-
ExportDeclaration : Export ExportClause AutoSemi { AST.JSExport $1 $2 $3 {- 'ExportDeclaration1' -} }
1170-
| Export VariableStatement AutoSemi { AST.JSExport $1 (AST.JSExportStatement $2) $3 {- 'ExportDeclaration2' -} }
1169+
ExportDeclaration : Export ExportClause AutoSemi
1170+
{ AST.JSExport $1 $2 $3 {- 'ExportDeclaration1' -} }
1171+
| Export VariableStatement AutoSemi
1172+
{ AST.JSExport $1 (AST.JSExportStatement $2) $3 {- 'ExportDeclaration2' -} }
11711173
11721174
-- ExportClause :
11731175
-- { }
11741176
-- { ExportsList }
11751177
-- { ExportsList , }
11761178
ExportClause :: { AST.JSExportBody }
1177-
ExportClause : LBrace RBrace { AST.JSExportClause $1 Nothing $2 {- 'ExportClause1' -} }
1178-
| LBrace ExportsList RBrace { AST.JSExportClause $1 (Just $2) $3 {- 'ExportClause2' -} }
1179+
ExportClause : LBrace RBrace
1180+
{ AST.JSExportClause $1 Nothing $2 {- 'ExportClause1' -} }
1181+
| LBrace ExportsList RBrace
1182+
{ AST.JSExportClause $1 (Just $2) $3 {- 'ExportClause2' -} }
11791183
11801184
-- ExportsList :
11811185
-- ExportSpecifier
11821186
-- ExportsList , ExportSpecifier
11831187
ExportsList :: { AST.JSCommaList AST.JSExportSpecifier }
1184-
ExportsList : ExportSpecifier { AST.JSLOne $1 {- 'ExportsList1' -} }
1185-
| ExportsList Comma ExportSpecifier { AST.JSLCons $1 $2 $3 {- 'ExportsList2' -} }
1188+
ExportsList : ExportSpecifier
1189+
{ AST.JSLOne $1 {- 'ExportsList1' -} }
1190+
| ExportsList Comma ExportSpecifier
1191+
{ AST.JSLCons $1 $2 $3 {- 'ExportsList2' -} }
11861192
11871193
-- ExportSpecifier :
11881194
-- IdentifierName
11891195
-- IdentifierName as IdentifierName
11901196
ExportSpecifier :: { AST.JSExportSpecifier }
1191-
ExportSpecifier : IdentifierName { AST.JSExportSpecifier (identName $1) {- 'ExportSpecifier1' -} }
1192-
| IdentifierName As IdentifierName { AST.JSExportSpecifierAs (identName $1) $2 (identName $3) {- 'ExportSpecifier2' -} }
1197+
ExportSpecifier : IdentifierName
1198+
{ AST.JSExportSpecifier (identName $1) {- 'ExportSpecifier1' -} }
1199+
| IdentifierName As IdentifierName
1200+
{ AST.JSExportSpecifierAs (identName $1) $2 (identName $3) {- 'ExportSpecifier2' -} }
11931201
11941202
-- For debugging/other entry points
11951203
LiteralMain :: { AST.JSAST }

0 commit comments

Comments
 (0)