Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add method-interface-member definition to syntax.md #2211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,12 @@ _ivar-member_ ::= _ivar-name_ `:` _type_
| `self` `.` _ivar-name_ `:` _type_
| _cvar-name_ `:` _type_

_method-member_ ::= _visibility_ `def` _method-name_ `:` _method-types_ # Instance method
| _visibility_ `def self.` _method-name_ `:` _method-types_ # Singleton method
| `def self?.` _method-name_ `:` _method-types_ # Singleton and instance method
_method-member_ ::= _method-class-member_
| _method-interface-member_
_method-class-member_ ::= _visibility_ `def` _method-name_ `:` _method-types_ # Instance method
| _visibility_ `def self.` _method-name_ `:` _method-types_ # Singleton method
| `def self?.` _method-name_ `:` _method-types_ # Singleton and instance method
_method-interface-member_ ::= `def` _method-name_ `:` _method-types_ # Instance method

_method-types_ ::= _method-type-parameters_ _method-type_ # Single method type
| _method-type-parameters_ _method-type_ `|` _method-types_ # Overloading types
Expand Down Expand Up @@ -624,7 +627,7 @@ _module-self-types_ ::= _class-name_ _type-arguments_ `,` _module-self-types_

_interface-decl_ ::= `interface` _interface-name_ _module-type-parameters_ _interface-members_ `end`

_interface-members_ ::= _method-member_ # Method
_interface-members_ ::= _method-interface-member_ # Method
| _include-interface-member_ # Mixin (include)
| _alias-member_ # Alias

Expand Down
Loading