diff --git a/grammar/src/class.grm b/grammar/src/class.grm index 5cf2b467ee9..9abb98c5a1a 100644 --- a/grammar/src/class.grm +++ b/grammar/src/class.grm @@ -42,7 +42,7 @@ typeParameter ; typeConstraint - : attributes userType ":" (userType | "this") // "this" for self-type + : userType ":" (userType | "this") // "this" for self-type // TODO: other constraints, maybe ; diff --git a/grammar/src/class_members.grm b/grammar/src/class_members.grm index a9432bb7aa5..a8fa20308d4 100644 --- a/grammar/src/class_members.grm +++ b/grammar/src/class_members.grm @@ -34,7 +34,7 @@ memberDeclaration : classObject : constructor : decomposer - : method + : function : property : class ; @@ -68,7 +68,7 @@ decomposer // TODO: consider other names : attributes "decomposer" SimpleName "(" (attributes SimpleName){","} ")" // Public properties only ; -method +function : modifiers "fun" functionRest ; diff --git a/grammar/src/toplevel.grm b/grammar/src/toplevel.grm index 9abe03d3600..84138e07f8a 100644 --- a/grammar/src/toplevel.grm +++ b/grammar/src/toplevel.grm @@ -22,7 +22,7 @@ toplevelObject : namespace : class : extension - : method + : function : property ; diff --git a/grammar/src/types.grm b/grammar/src/types.grm index bd13fa46ff2..99561cddcd5 100644 --- a/grammar/src/types.grm +++ b/grammar/src/types.grm @@ -13,10 +13,11 @@ type : userType : functionType : tupleType + : attributes type ; userType - : SimpleName{"."} ("<" (varianceSpecifier? type){","} ">")? + : SimpleName{"."} ("<" (modifiers type){","} ">")? ; functionType