Skip to content

Commit f09550d

Browse files
authored
Merge pull request #6330 from dotty-staging/change-syntax-cleanups
Syntax cleanups
2 parents afb7a8b + 04d2a84 commit f09550d

File tree

3 files changed

+388
-7
lines changed

3 files changed

+388
-7
lines changed

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2773,10 +2773,11 @@ object Parsers {
27732773
}
27742774

27752775
/** TopStatSeq ::= TopStat {semi TopStat}
2776-
* TopStat ::= Annotations Modifiers Def
2776+
* TopStat ::= Import
2777+
* | Export
2778+
* | Annotations Modifiers Def
27772779
* | Packaging
27782780
* | package object objectDef
2779-
* | Import
27802781
* |
27812782
*/
27822783
def topStatSeq(): List[Tree] = {
@@ -2810,6 +2811,7 @@ object Parsers {
28102811

28112812
/** TemplateStatSeq ::= [id [`:' Type] `=>'] TemplateStat {semi TemplateStat}
28122813
* TemplateStat ::= Import
2814+
* | Export
28132815
* | Annotations Modifiers Def
28142816
* | Annotations Modifiers Dcl
28152817
* | Expr1
@@ -2895,7 +2897,7 @@ object Parsers {
28952897
var mods = defAnnotsMods(localModifierTokens)
28962898
for (imod <- implicitMods.mods) mods = addMod(mods, imod)
28972899
if (mods.is(Final)) {
2898-
// A final modifier means the local definition is "class-like".
2900+
// A final modifier means the local definition is "class-like". // FIXME: Deal with modifiers separately
28992901
tmplDef(start, mods)
29002902
} else {
29012903
defOrDcl(start, mods)

0 commit comments

Comments
 (0)