miniruby 0.1.0 → 0.2.0

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: c2564e7112404f30ad0a3086614cefc695da9c1df699fc7d97a0822c6433cae1
4
- data.tar.gz: 3f0cb46867de3e19a278ce4004f1aed0cedc795aa13b13a716fe2a70dcd6bb58
3
+ metadata.gz: b4b95c75a52ab5a51fdb41c2721323256d4983ac109e223840c0527bdbca01d8
4
+ data.tar.gz: 72f0db09bcd1228eaae0c530382c3746d00db27ef489b169032a5431d45f79cd
5
5
  SHA512:
6
- metadata.gz: d6d74088718f4eedc19a9461129ba67fae171ae2f07bd31ef98be3ecfb22c3fa8e1f61efe32e7b831f64f550e586207fc863ce8ea083b9d2c2787b272d3dba20
7
- data.tar.gz: 36ddb499adb601dfb3f85230d99dd3899d5342f603b17c85c256e7e71fcad4c46495f8b1a18392206d5ea2d24fcd0fba4f02587b210f93dd519eed7ca13add02
6
+ metadata.gz: be29ee866331b6e375f7950185c0d1b7d078019a87b07057298f9e600a2c909128285033921a1b70556f291cf6448beed3081e2906541a88fe449d53bb401c7e
7
+ data.tar.gz: 07420f654d4cf62143bddd5bc2f3b2062ad43c367c52b596345e9ee579c93bd834310e1f80ada72c327ce766d44c7b65ee07861cdfedcb40cbafddf438115a9f
data/.rubocop.yml CHANGED
@@ -1,77 +1,86 @@
1
- AllCops:
2
- TargetRubyVersion: 3.2
3
-
4
1
  inherit_gem:
5
2
  rubocop-espago: sorbet.yml
6
3
 
7
- Lint/BooleanSymbol:
8
- Enabled: false
4
+ AllCops:
5
+ TargetRubyVersion: 3.4
9
6
 
10
- Lint/MissingSuper:
7
+ Metrics/PerceivedComplexity:
11
8
  Enabled: false
12
9
 
13
- Style/NumericPredicate:
10
+ Style/RaiseArgs:
14
11
  Enabled: false
15
12
 
16
- Metrics/MethodLength:
13
+ Style/MultipleComparison:
17
14
  Enabled: false
18
15
 
19
- Metrics/AbcSize:
16
+ Style/YodaExpression:
20
17
  Enabled: false
21
18
 
22
- Style/YodaExpression:
19
+ Sorbet/ForbidTTypeAlias:
23
20
  Enabled: false
24
21
 
25
- Metrics/CyclomaticComplexity:
22
+ Sorbet/CallbackConditionalsBinding:
26
23
  Enabled: false
27
24
 
28
- Metrics/BlockLength:
25
+ Style/InvertibleUnlessCondition:
29
26
  Enabled: false
30
27
 
31
- Metrics/ClassLength:
28
+ Style/GuardClause:
32
29
  Enabled: false
33
30
 
34
- Style/RaiseArgs:
31
+ Sorbet/ForbidMixesInClassMethods:
35
32
  Enabled: false
36
33
 
37
- Style/ZeroLengthPredicate:
34
+ Lint/SafeNavigationConsistency:
38
35
  Enabled: false
39
36
 
40
- Lint/DeprecatedConstants:
37
+ Metrics/ClassLength:
41
38
  Enabled: false
42
39
 
43
- Metrics/PerceivedComplexity:
40
+ Metrics/MethodLength:
44
41
  Enabled: false
45
42
 
46
- Style/InfiniteLoop:
43
+ Style/SafeNavigationChainLength:
47
44
  Enabled: false
48
45
 
49
- Style/WhileUntilModifier:
46
+ Lint/SelfAssignment:
50
47
  Enabled: false
51
48
 
52
- Style/FormatStringToken:
49
+ Sorbet/RedundantExtendTSig:
53
50
  Enabled: false
54
51
 
55
- Layout/EmptyLinesAroundArguments:
52
+ Style/HashLookupMethod:
56
53
  Enabled: false
57
54
 
58
- Naming/BlockForwarding:
55
+ Style/MethodCallWithoutArgsParentheses:
59
56
  Enabled: false
60
57
 
61
- Sorbet/RedundantExtendTSig:
58
+ Style/InfiniteLoop:
62
59
  Enabled: false
63
60
 
64
61
  Sorbet/ForbidTUnsafe:
65
62
  Enabled: false
66
63
 
64
+ Sorbet/ForbidTSig:
65
+ Enabled: false
66
+
67
+ Lint/BooleanSymbol:
68
+ Enabled: false
69
+
67
70
  Sorbet/ForbidTypeAliasedShapes:
68
71
  Enabled: false
69
72
 
70
- Sorbet/ForbidTUntyped:
73
+ Metrics/CyclomaticComplexity:
71
74
  Enabled: false
72
75
 
73
- Style/MethodCallWithoutArgsParentheses:
76
+ Style/OneClassPerFile:
77
+ Enabled: false
78
+
79
+ Sorbet/ForbidTHelpers:
80
+ Enabled: false
81
+
82
+ Style/FormatStringToken:
74
83
  Enabled: false
75
84
 
76
- Lint/RedundantRequireStatement:
85
+ Style/ItBlockParameter:
77
86
  Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.2
1
+ 3.4.9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2026-04-15
4
+ - Add new parser capabilities:
5
+ - Add `break`, `next`, `unless`
6
+ - modifier `if` and `unless`
7
+ - attribute access (`foo.bar`)
8
+
3
9
  ## [0.1.0] - 2025-02-12
4
10
 
5
11
  - Initial release
data/README.md CHANGED
@@ -31,7 +31,7 @@ You can call the `next` method to receive the next token.
31
31
  Once the lexing is complete a token of type `:end_of_file` gets returned.
32
32
 
33
33
  ```rb
34
- require 'ruby_json_parser'
34
+ require 'miniruby'
35
35
 
36
36
  lexer = MiniRuby::Lexer.new(<<~RUBY)
37
37
  foo = 5
@@ -51,7 +51,7 @@ lexer.next #=> Token(:end_of_file)
51
51
  There is a simplified API that lets you generate an array of all tokens.
52
52
 
53
53
  ```rb
54
- require 'ruby_json_parser'
54
+ require 'miniruby'
55
55
 
56
56
  MiniRuby.lex(<<~RUBY)
57
57
  foo = 5
@@ -69,7 +69,7 @@ with source code.
69
69
  It returns `MiniRuby::Parser::Result` which contains the produced AST (Abstract Syntax Tree) and the list of encountered errors.
70
70
 
71
71
  ```rb
72
- require 'ruby_json_parser'
72
+ require 'miniruby'
73
73
 
74
74
  MiniRuby.parse(<<~RUBY)
75
75
  a = 0
@@ -185,7 +185,7 @@ It returns `MiniRuby::BytecodeFunction`, an executable chunk of bytecode.
185
185
 
186
186
 
187
187
  ```rb
188
- require 'ruby_json_parser'
188
+ require 'miniruby'
189
189
 
190
190
  func = MiniRuby.compile(<<~RUBY)
191
191
  a = 0
@@ -226,7 +226,7 @@ func.class #=> MiniRuby::BytecodeFunction
226
226
  You can also use the compiler directly to compile an already produced AST.
227
227
 
228
228
  ```rb
229
- require 'ruby_json_parser'
229
+ require 'miniruby'
230
230
 
231
231
  parse_result = MiniRuby.parse(<<~RUBY)
232
232
  a = 0
@@ -276,7 +276,7 @@ It returns the last computed value in the bytecode.
276
276
 
277
277
 
278
278
  ```rb
279
- require 'ruby_json_parser'
279
+ require 'miniruby'
280
280
 
281
281
  result = MiniRuby.interpret(<<~RUBY)
282
282
  a = 0
@@ -297,7 +297,7 @@ result == 6 #=> true
297
297
  You can also use the VM directly to interpret an already produced piece of bytecode.
298
298
 
299
299
  ```rb
300
- require 'ruby_json_parser'
300
+ require 'miniruby'
301
301
 
302
302
  func = MiniRuby::Compiler.compile_source(<<~RUBY)
303
303
  a = 0