t-ruby 0.0.3 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/lib/t_ruby/error_handler.rb +2 -2
- data/lib/t_ruby/parser.rb +3 -3
- data/lib/t_ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ff23c88b45e7a1f1c189bd3a9774d80877bc34024f2faa6475fccf2c063019f
|
|
4
|
+
data.tar.gz: 8c8ec1a3b6964f72ea75144624099d8dadf8e27c893e0608b2147377db5eeeab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 252399c336495e2c261cc137e9612d8f3076ae7e77a01fe827f9252357c693f8870482629bc8e858d9451fd377940abd1ba927ccbfa222fa29b9f34d5eb37f9e
|
|
7
|
+
data.tar.gz: 82d876865a19cece6684474f09bbab7185fb2947070f2aeda5c9d5cd0dd6b250443f0595c88674748a351d2902ac7a4cc6e243c85ebfe34b6692f82d48252b1d
|
data/README.md
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<img src="https://img.shields.io/badge/CI-passing-brightgreen" alt="CI: passing" />
|
|
13
13
|
<img src="https://img.shields.io/badge/ruby-3.0+-cc342d" alt="Ruby 3.0+" />
|
|
14
|
-
<img src="https://img.shields.io/
|
|
15
|
-
<img src="https://img.shields.io/
|
|
14
|
+
<a href="https://rubygems.org/gems/t-ruby"><img src="https://img.shields.io/gem/v/t-ruby" alt="Gem Version" /></a>
|
|
15
|
+
<img src="https://img.shields.io/gem/dt/t-ruby" alt="Downloads" />
|
|
16
16
|
<img src="https://img.shields.io/badge/coverage-90%25-brightgreen" alt="Coverage: 90%" />
|
|
17
17
|
</p>
|
|
18
18
|
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
<a href="./README.ja.md">日本語</a>
|
|
31
31
|
</p>
|
|
32
32
|
|
|
33
|
+
> [!NOTE]
|
|
34
|
+
> This project is still experimental. If you support this project, please give it a star! If you have suggestions for improvements, please open an issue. Pull requests are also welcome!
|
|
35
|
+
|
|
33
36
|
---
|
|
34
37
|
|
|
35
38
|
## What is T-Ruby?
|
data/lib/t_ruby/error_handler.rb
CHANGED
|
@@ -30,9 +30,9 @@ module TRuby
|
|
|
30
30
|
|
|
31
31
|
def check_interface_errors
|
|
32
32
|
@lines.each_with_index do |line, idx|
|
|
33
|
-
next unless line.match?(/^\s*interface\s
|
|
33
|
+
next unless line.match?(/^\s*interface\s+[\w:]+/)
|
|
34
34
|
|
|
35
|
-
match = line.match(/^\s*interface\s+(\w+)/)
|
|
35
|
+
match = line.match(/^\s*interface\s+([\w:]+)/)
|
|
36
36
|
next unless match
|
|
37
37
|
|
|
38
38
|
interface_name = match[1]
|
data/lib/t_ruby/parser.rb
CHANGED
|
@@ -200,7 +200,7 @@ module TRuby
|
|
|
200
200
|
|
|
201
201
|
def parse_interface(start_index)
|
|
202
202
|
line = @lines[start_index]
|
|
203
|
-
match = line.match(/^\s*interface\s+(\w+)/)
|
|
203
|
+
match = line.match(/^\s*interface\s+([\w:]+)/)
|
|
204
204
|
return [nil, start_index] unless match
|
|
205
205
|
|
|
206
206
|
interface_name = match[1]
|
|
@@ -211,8 +211,8 @@ module TRuby
|
|
|
211
211
|
current_line = @lines[i]
|
|
212
212
|
break if current_line.match?(/^\s*end\s*$/)
|
|
213
213
|
|
|
214
|
-
if current_line.match?(/^\s
|
|
215
|
-
member_match = current_line.match(/^\s*(\w+)\s*:\s*(.+?)\s*$/)
|
|
214
|
+
if current_line.match?(/^\s*[\w!?]+\s*:\s*/)
|
|
215
|
+
member_match = current_line.match(/^\s*([\w!?]+)\s*:\s*(.+?)\s*$/)
|
|
216
216
|
if member_match
|
|
217
217
|
member = {
|
|
218
218
|
name: member_match[1],
|
data/lib/t_ruby/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: t-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Y. Fred Kim
|
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
requirements: []
|
|
84
|
-
rubygems_version:
|
|
84
|
+
rubygems_version: 4.0.1
|
|
85
85
|
specification_version: 4
|
|
86
86
|
summary: T-Ruby - TypeScript-style types for Ruby
|
|
87
87
|
test_files: []
|