ruby_parser
Advanced tools
+11
-0
@@ -0,1 +1,12 @@ | ||
| === 3.7.1 / 2015-08-06 | ||
| * 1 minor enhancement: | ||
| * Improved understandability of lexing postfix symbols. | ||
| * 2 bug fixes: | ||
| * Fixed timeout caused by regexp backtracking bug w/ long strings in 2.2 parser. (presidentbeef) | ||
| * Rename DEBUG env toggle to RB_LINENO_DEBUG. (tenderlove) | ||
| === 3.7.0 / 2015-05-28 | ||
@@ -2,0 +13,0 @@ |
+18
-1
@@ -665,2 +665,19 @@ # encoding: UTF-8 | ||
| def was_label? | ||
| @was_label = ruby22_label? | ||
| true | ||
| end | ||
| def process_label_or_string text | ||
| if @was_label && text =~ /:$/ then | ||
| @was_label = nil | ||
| return process_label text | ||
| elsif text =~ /:$/ then | ||
| ss.pos -= 1 # put back ":" | ||
| text = text[0..-2] | ||
| end | ||
| result :expr_end, :tSTRING, text[1..-2].gsub(/\\\\/, "\\").gsub(/\\'/, "'") | ||
| end | ||
| def process_label text | ||
@@ -1206,3 +1223,3 @@ result = process_symbol text | ||
| if ENV["DEBUG"] then | ||
| if ENV["RP_LINENO_DEBUG"] then | ||
| class RubyLexer | ||
@@ -1209,0 +1226,0 @@ alias :old_lineno= :lineno= |
@@ -166,6 +166,4 @@ # encoding: UTF-8 | ||
| process_square_bracket text | ||
| when ruby22_label? && (text = ss.scan(/\'#{SSTRING}\':/o)) then | ||
| process_label text | ||
| when text = ss.scan(/\'#{SSTRING}\'/o) then | ||
| action { result :expr_end, :tSTRING, matched[1..-2].gsub(/\\\\/, "\\").gsub(/\\'/, "'") } # " stupid emacs | ||
| when was_label? && (text = ss.scan(/\'#{SSTRING}\':?/o)) then | ||
| process_label_or_string text | ||
| when ss.check(/\|/) then | ||
@@ -172,0 +170,0 @@ case |
@@ -94,3 +94,3 @@ # encoding: ASCII-8BIT | ||
| module RubyParserStuff | ||
| VERSION = "3.7.0" unless constants.include? "VERSION" # SIGH | ||
| VERSION = "3.7.1" unless constants.include? "VERSION" # SIGH | ||
@@ -97,0 +97,0 @@ attr_accessor :lexer, :in_def, :in_single, :file |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display