dead_end 3.0.2 → 3.0.3
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/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/dead_end/left_right_lex_count.rb +11 -0
- data/lib/dead_end/ripper_errors.rb +6 -0
- data/lib/dead_end/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: 88cc140d421e1df16009993e7d7438054dad7a6b6fec740496e92c06c0bc2f6d
|
4
|
+
data.tar.gz: ba736b1459f6c18aed62b566fa8e48ca6a4dd8379bc2dc2d99594c0daf136fb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cf585c9f073344d6259478c239fd45b77a5fb7fd1c37c18d3d2a7cf91323b00750cccb18d666935ea20ce2c209137216304429a26aac0bf26fec7aa5440ff14
|
7
|
+
data.tar.gz: 8a818ac4001ce7ec01ae36c4c223f47c7686e111226718cf22e8e2ca9f00a0bb3f3ef6409ad703cb698a67dc62035225973f37ea5f527207c26e705acd4c8f33
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
## HEAD (unreleased)
|
2
2
|
|
3
|
+
## 3.0.3
|
4
|
+
|
5
|
+
- Expand explanations coming from additional Ripper errors (https://github.com/zombocom/dead_end/pull/117)
|
6
|
+
- Fix explanation involving shorthand syntax for literals like `%w[]` and `%Q{}` (https://github.com/zombocom/dead_end/pull/116)
|
7
|
+
|
3
8
|
## 3.0.2
|
4
9
|
|
5
10
|
- Fix windows filename detection (https://github.com/zombocom/dead_end/pull/114)
|
data/Gemfile.lock
CHANGED
@@ -61,6 +61,17 @@ module DeadEnd
|
|
61
61
|
# ^^^
|
62
62
|
# Means it's a string or a symbol `"{"` rather than being
|
63
63
|
# part of a data structure (like a hash) `{ a: b }`
|
64
|
+
# ignore it.
|
65
|
+
when :on_words_beg, :on_symbos_beg, :on_qwords_beg,
|
66
|
+
:on_qsymbols_beg, :on_regexp_beg, :on_tstring_beg
|
67
|
+
# ^^^
|
68
|
+
# Handle shorthand syntaxes like `%Q{ i am a string }`
|
69
|
+
#
|
70
|
+
# The start token will be the full thing `%Q{` but we
|
71
|
+
# need to count it as if it's a `{`. Any token
|
72
|
+
# can be used
|
73
|
+
char = lex.token[-1]
|
74
|
+
@count_for_char[char] += 1 if @count_for_char.key?(char)
|
64
75
|
when :on_embexpr_beg
|
65
76
|
# ^^^
|
66
77
|
# Embedded string expressions like `"#{foo} <-embed"`
|
@@ -18,6 +18,12 @@ module DeadEnd
|
|
18
18
|
@errors << msg
|
19
19
|
end
|
20
20
|
|
21
|
+
alias_method :on_alias_error, :on_parse_error
|
22
|
+
alias_method :on_assign_error, :on_parse_error
|
23
|
+
alias_method :on_class_name_error, :on_parse_error
|
24
|
+
alias_method :on_param_error, :on_parse_error
|
25
|
+
alias_method :compile_error, :on_parse_error
|
26
|
+
|
21
27
|
def call
|
22
28
|
@run_once ||= begin
|
23
29
|
@errors = []
|
data/lib/dead_end/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dead_end
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- schneems
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: When you get an "unexpected end" in your syntax this gem helps you find
|
14
14
|
it
|