rbs-inline 0.2.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,43 +1,49 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbs-inline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-10 00:00:00.000000000 Z
11
+ date: 2024-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prism
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.29'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: 0.24.0
22
+ version: '0.31'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.29'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 0.24.0
32
+ version: '0.31'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rbs
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: 3.5.0.pre
39
+ version: 3.5.0
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: 3.5.0.pre
46
+ version: 3.5.0
41
47
  description: Inline RBS type declaration.
42
48
  email:
43
49
  - matsumoto@soutaro.com
@@ -67,21 +73,19 @@ files:
67
73
  - lib/rbs/inline/writer.rb
68
74
  - rbs_collection.lock.yaml
69
75
  - rbs_collection.yaml
76
+ - sig/generated/rbs/inline.rbs
70
77
  - sig/generated/rbs/inline/annotation_parser.rbs
71
78
  - sig/generated/rbs/inline/ast/annotations.rbs
79
+ - sig/generated/rbs/inline/ast/comment_lines.rbs
72
80
  - sig/generated/rbs/inline/ast/declarations.rbs
73
81
  - sig/generated/rbs/inline/ast/members.rbs
82
+ - sig/generated/rbs/inline/ast/tree.rbs
74
83
  - sig/generated/rbs/inline/cli.rbs
84
+ - sig/generated/rbs/inline/node_utils.rbs
75
85
  - sig/generated/rbs/inline/parser.rbs
76
- - sig/rbs/inline.rbs
77
- - sig/rbs/inline/annotation_parser.rbs
78
- - sig/rbs/inline/ast/comment_lines.rbs
86
+ - sig/generated/rbs/inline/version.rbs
87
+ - sig/generated/rbs/inline/writer.rbs
79
88
  - sig/rbs/inline/ast/members.rbs
80
- - sig/rbs/inline/ast/tree.rbs
81
- - sig/rbs/inline/node_utils.rbs
82
- - sig/rbs/inline/writer.rbs
83
- - yard-samples/hello.rb
84
- - yard-samples/sample1.rb
85
89
  homepage: https://github.com/soutaro/rbs-inline
86
90
  licenses:
87
91
  - MIT
File without changes
@@ -1,7 +0,0 @@
1
- module RBS
2
- module Inline
3
- module NodeUtils
4
- def type_name: (Prism::Node) -> TypeName?
5
- end
6
- end
7
- end
@@ -1,27 +0,0 @@
1
- module RBS
2
- module Inline
3
- class Writer
4
- attr_reader output: String
5
-
6
- attr_reader writer: RBS::Writer
7
-
8
- def self.write: (Array[AST::Annotations::Use], Array[AST::Declarations::t]) -> String
9
-
10
- def initialize: (?String) -> void
11
-
12
- def write: (Array[AST::Annotations::Use], Array[AST::Declarations::t]) -> void
13
-
14
- def header: (*String) -> void
15
-
16
- def translate_decl: (AST::Declarations::t) -> RBS::AST::Declarations::t?
17
-
18
- def translate_class_decl: (AST::Declarations::ClassDecl) -> RBS::AST::Declarations::Class?
19
-
20
- def translate_module_decl: (AST::Declarations::ModuleDecl) -> RBS::AST::Declarations::Module?
21
-
22
- def translate_constant_decl: (AST::Declarations::ConstantDecl) -> RBS::AST::Declarations::Constant?
23
-
24
- def translate_member: (AST::Members::t) -> Array[RBS::AST::Members::t | RBS::AST::Declarations::t]?
25
- end
26
- end
27
- end
data/sig/rbs/inline.rbs DELETED
@@ -1,41 +0,0 @@
1
- module RBS
2
- module Inline
3
- type token = [Symbol, String]
4
-
5
- VERSION: String
6
-
7
- module AST
8
- module Declarations
9
- end
10
-
11
- module Annotations
12
- type t = VarType
13
- | ReturnType
14
- | Use
15
- | Inherits
16
- | Generic
17
- | ModuleSelf
18
- | Skip
19
- | Assertion
20
- | Application
21
- | RBSAnnotation
22
- | Override
23
- | IvarType
24
- | Yields
25
- | Embedded
26
- # | Def
27
- # | AttrReader | AttrWriter | AttrAccessor
28
- # | Include | Extend | Prepend
29
- # | Alias
30
- end
31
-
32
- module Members
33
- type ruby = RubyDef | RubyAlias | RubyMixin | RubyAttr | RubyPublic | RubyPrivate
34
-
35
- type rbs = RBSIvar | RBSEmbedded
36
-
37
- type t = ruby | rbs
38
- end
39
- end
40
- end
41
- end
@@ -1,6 +0,0 @@
1
- require "prism"
2
-
3
- ast = Prism.parse_file("yard-samples/sample1.rb")
4
-
5
- pp ast.value
6
- pp ast.comments
@@ -1,26 +0,0 @@
1
- module Foo
2
- # This is `Foo#foo` method
3
- #
4
- # @param i [Integer] Size of something
5
- # @param j [Symbol,Integer] Something doing meaningful
6
- # @return [String?] Returns a string or nil
7
- #
8
- #
9
- # @rbs.method (Integer, String) -> void
10
- # | [A] () { () [self: String] -> A } -> A?
11
- #
12
- def foo(i, j)
13
-
14
- end
15
-
16
- # @rbs.inline
17
- # attr_reader hoge: String
18
- # attr_reader name: String?
19
- def hoge
20
-
21
- end
22
-
23
- class Foo
24
- # @rbs.inline include Foo[String]
25
- end
26
- end