ruby-ll 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/changelog.md +5 -0
- data/lib/ll/parser.rb +14 -0
- data/lib/ll/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f816ca49eba9a69f120188b3592013fb468b88e7
|
4
|
+
data.tar.gz: 4aee890a0b896d1e2f8fd0c8632ea2aa52f9aef3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ada3bbd3c92109b00f05204fcf562bcff13059e86781b158a6795295d60b836d8f5593be570c185bbd3b59521386cf04e471647087746da2b71a0f6e96b9491b
|
7
|
+
data.tar.gz: 2a872fd645e4e24d132a12a48acc6e1b402cb19856aad419cd996764ae61120e30a88a0afcbbca12c5d0264e9c6d3b166a418e56aee90c2140a2ef35f83afba6
|
data/doc/changelog.md
CHANGED
@@ -3,6 +3,11 @@
|
|
3
3
|
This document contains details of the various releases and their release dates.
|
4
4
|
Dates are in the format `yyyy-mm-dd`.
|
5
5
|
|
6
|
+
## 1.1.1 - 2015-02-16
|
7
|
+
|
8
|
+
Parser errors produced by ruby-ll's own parser/grammar now include the line
|
9
|
+
number/column number whenever possible.
|
10
|
+
|
6
11
|
## 1.1.0 - 2015-02-16
|
7
12
|
|
8
13
|
This release changes the way error handling is done. Instead of having multiple,
|
data/lib/ll/parser.rb
CHANGED
@@ -135,6 +135,20 @@ class Parser < LL::Driver
|
|
135
135
|
return AST::Node.new(*args)
|
136
136
|
end
|
137
137
|
|
138
|
+
##
|
139
|
+
# @see [LL::Driver#parser_error]
|
140
|
+
#
|
141
|
+
def parser_error(stack_type, stack_value, token_type, token_value)
|
142
|
+
message = parser_error_message(stack_type, stack_value, token_type)
|
143
|
+
|
144
|
+
if token_value.is_a?(LL::Token)
|
145
|
+
sl = token_value.source_line
|
146
|
+
message += " (line #{sl.line}, column #{sl.column})"
|
147
|
+
end
|
148
|
+
|
149
|
+
raise ParserError, message
|
150
|
+
end
|
151
|
+
|
138
152
|
def _rule_0(val)
|
139
153
|
s(:grammar, val[0])
|
140
154
|
end
|
data/lib/ll/version.rb
CHANGED