ClassDecl | |||
::= | class ClassId (: ClassInterface)opt ClassDef | ||
| | class ClassId (: ClassInterface)opt = NamedClass | ||
ClassDef | |||
::= | { (inherits NamedClass)opt MemberDecl* InitiallyClauseopt } | ||
NamedClass | |||
::= | Pathopt ClassId TypeArgsopt |
MemberDecl | |||
::= | publicopt FieldDecl | ||
| | publicopt MethodDecl | ||
| | publicopt MakerDecl |
FieldDecl | |||
::= | field Label : ExtendedType |
MethodDecl | |||
::= | abstract method Label : TypeScheme | ||
| | finalopt overrideopt method Label FunDef |
MakerDecl | |||
::= | maker MakerId Params MakerBlock | ||
MakerBlock | |||
::= | { MakerStmt (; MakerStmt)* } | ||
| | { } | ||
MakerStmt | |||
::= | super MakerId Expression | ||
| | field Label = Expression | ||
| | Statement |
InitiallyClause | |||
::= | initially Expression |