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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9dc9d3e890986ae19867eefbf3f337293d79e546ea00d4cae29a54147169a504
4
- data.tar.gz: 01d1c38aaf4766845dd7975fa094c0dccf219e00d76a079acb23864271bda89d
3
+ metadata.gz: 3ff23c88b45e7a1f1c189bd3a9774d80877bc34024f2faa6475fccf2c063019f
4
+ data.tar.gz: 8c8ec1a3b6964f72ea75144624099d8dadf8e27c893e0608b2147377db5eeeab
5
5
  SHA512:
6
- metadata.gz: f80c50c441219590ae24d2448fc2b627d5f5edd057fc401da12b9da878daae1ed72956e028f195d15aa0e8cd686c4abc2f65e57cdd72722100ee39b6d5c630dc
7
- data.tar.gz: afb7e5425547ec2438d9ec194b77acf002c6e4150d90e589a6a06b90cbfe86863306ba6a774aa7eb38dffecaf0de8bf669eea5680ef511f2d86ce788bf52fc99
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/badge/gem-v0.0.3-blue" alt="Gem: v0.0.3" />
15
- <img src="https://img.shields.io/badge/downloads-0-lightgrey" alt="Downloads" />
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?
@@ -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+\w+/)
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*\w+\s*:\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],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TRuby
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.6"
5
5
  end
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.3
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: 3.7.2
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: []