syntax_tree 3.6.2 → 3.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2feb5b8df043a9d8c8a75e6cf16f42ef1b4f84877d64ad7fe91725e4f1c4f013
4
- data.tar.gz: e1eca9750c08fca80ada1bc3d7831a996dc01fd9f8651cd4f1d6b8c9decff0ea
3
+ metadata.gz: 8d3e93f183f51e89359bbe6876adfccef46e55caacfa03b3e07ddc5cb71a0b8f
4
+ data.tar.gz: 2ce6c1ae1def2dab208b76716912a3aa96b050e88360db65e507b49d8ba248e5
5
5
  SHA512:
6
- metadata.gz: d3e061694d3ae39053ee7b6a9ff41e1230cf714e23d037da307c720fccebd2f674505c15f74eb515e4b6b45050e665792039b8f897f8594ac7fbadc0142e4d6e
7
- data.tar.gz: c81f87007866892f47afaa41cfe053c9af44126641fad5605e5130356791ee76fcf9bbc95082cb63bc64e4daf90051de3faeb40ec5a672d1717a7858bd830165
6
+ metadata.gz: 852c2276cf66e87a3b972ccdf0597a394ba2d4a528b03ff1e9e6ae15e3d3e0e89de3391bd480a7e2f471de795b50cf5af9be4659b37dcbd87ba91870c8de0da3
7
+ data.tar.gz: 82c17f58d9536bc1d95ea7a4fb75d076a283f69b5005fbe83beaccdcbdc5c1c6530346012fe0c8960aa881aa3474177c7707b2404620cd4791991ab2be64fbab
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.6.3] - 2022-10-11
10
+
11
+ ### Changed
12
+
13
+ - [#167](https://github.com/ruby-syntax-tree/syntax_tree/pull/167) - Change the error encountered when an `else` node does not have an associated `end` token to be a parse error.
14
+
9
15
  ## [3.6.2] - 2022-10-04
10
16
 
11
17
  ### Changed
@@ -364,7 +370,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
364
370
 
365
371
  - 🎉 Initial release! 🎉
366
372
 
367
- [unreleased]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.6.2...HEAD
373
+ [unreleased]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.6.3...HEAD
374
+ [3.6.3]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.6.2...v3.6.3
368
375
  [3.6.2]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.6.1...v3.6.2
369
376
  [3.6.1]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.6.0...v3.6.1
370
377
  [3.6.0]: https://github.com/ruby-syntax-tree/syntax_tree/compare/v3.5.0...v3.6.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- syntax_tree (3.6.2)
4
+ syntax_tree (3.6.3)
5
5
  prettier_print
6
6
 
7
7
  GEM
@@ -1327,6 +1327,11 @@ module SyntaxTree
1327
1327
  token.is_a?(Kw) && %w[end ensure].include?(token.value)
1328
1328
  end
1329
1329
 
1330
+ if index.nil?
1331
+ message = "Cannot find expected else ending"
1332
+ raise ParseError.new(message, *find_token_error(keyword.location))
1333
+ end
1334
+
1330
1335
  node = tokens[index]
1331
1336
  ending = node.value == "end" ? tokens.delete_at(index) : node
1332
1337
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SyntaxTree
4
- VERSION = "3.6.2"
4
+ VERSION = "3.6.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syntax_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.2
4
+ version: 3.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Newton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-04 00:00:00.000000000 Z
11
+ date: 2022-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prettier_print