vendor/ruby-signature/docs/syntax.md in steep-0.14.0 vs vendor/ruby-signature/docs/syntax.md in steep-0.15.0

- old
+ new

@@ -35,11 +35,11 @@ | `::` (Root) | _namespace_ /[A-Z]\w*/ `::` (Namespace) _type-arguments_ ::= (No application) | `[` _type_ `,` ... `]` (Type application) - + _literal_ ::= _string-literal_ | _symbol-literal_ | _integer-literal_ | `true` | `false` @@ -157,11 +157,11 @@ Type variables cannot be distinguished from _class instance types_. They are scoped in _class/module/interface declaration_ or _generic method types_. ``` class Ref[T] # Object is scoped in the class declaration. - @value: T # Type variable `T` + @value: T # Type variable `T` def map: [X] { (T) -> X } -> Ref[X] # X is a type variable scoped in the method type. end ``` ### Proc type @@ -207,11 +207,11 @@ ```markdown _method-type_ ::= `(` _parameters_ `) ->` _type_ # Method without block | `(` _parameters_ `) { (` _parameters_ `) -> ` _type_ `} ->` _type_ # Method with required block | `(` _parameters_ `) ?{ (` _parameters_ `) -> ` _type_ `} ->` _type_ # Method with optional block - + _parameters_ ::= _required-positionals_ _optional-positionals_ _rest-positional_ _trailing-positionals_ _keywords_ _paramater_ ::= _type_ _var-name_ # Parameter with var name | _type_ # Parameter without var name _required-positionals_ ::= _parameter_ `,` ... @@ -261,11 +261,11 @@ | _extend-member_ # Mixin (extend) | _prepend-member_ # Mixin (prepend) | _alias-member_ # Alias | `public` # Public | `private` # Private - + _ivar-member_ ::= _ivar-name_ `:` _type_ _method-member_ ::= `def` _method-name_ `:` _method-types_ # Instance method | `def self.` _method-name_ `:` _method-types_ # Singleton method | `def self?.` _method-name_ `:` _method-types_ # Singleton and instance method @@ -289,11 +289,11 @@ | `extend` _interface-name_ _type-arguments_ _prepend-member_ ::= `prepend` _class-name_ _type-arguments_ _alias-member_ ::= `alias` _method-name_ _method-name_ | `alias self.` _method-name_ `self.` _method-name_ - + _ivar-name_ ::= /@\w+/ _method-name_ ::= ... | /`[^`]+`/ ``` @@ -404,20 +404,20 @@ | _const-decl_ # Constant declaration | _global-decl_ # Global declaration _class-decl_ ::= `class` _class-name_ _module-type-parameters_ _members_ `end` | `class` _class-name_ _module-type-parameters_ `<` _class-name_ _type-arguments_ _members_ `end` - + _module-decl_ ::= `module` _module-name_ _module-type-parameters_ _members_ `end` | `module` _module-name_ _module-type-parameters_ `:` _class-name_ _type-arguments_ _members_ `end` _interface-decl_ ::= `interface` _interface-name_ _module-type-parameters_ _interface-members_ `end` -_interface-members_ ::= _method-member_ # Method +_interface-members_ ::= _method-member_ # Method | _include-member_ # Mixin (include) | _alias-member_ # Alias - + _extension-decl_ ::= `extension` _class-name_ _type-parameters_ `(` _extension-name_ `)` _members_ `end` _type-alias-decl_ ::= `type` _alias-name_ `=` _type_ _const-decl_ ::= _const-name_ `:` _type_ @@ -457,10 +457,10 @@ module Enumerable[A, B] : _Each[A, B] def count: () -> Integer end ``` -The `Enumerable` method above requires `each` method for enumerating objects. +The `Enumerable` module above requires `each` method for enumerating objects. ### Interface declaration Interface declaration can have parameters but allows only a few of the members.