ruby_parser
Advanced tools
+7
-0
@@ -0,1 +1,8 @@ | ||
| === 2.3.1 / 2011-09-21 | ||
| * 2 bug fixes: | ||
| * Fixed line numbers at end of special var+whitespace (larsch) | ||
| * Holy crap I was smokin' something good... Fixed 1.9.3 warning | ||
| === 2.3.0 / 2011-09-06 | ||
@@ -2,0 +9,0 @@ |
@@ -730,3 +730,3 @@ class RubyLexer | ||
| unless src.scan(/.*?\n=end( |\t|\f)*[^(\n|\z)]*(\n|\z)/m) then | ||
| unless src.scan(/.*?\n=end( |\t|\f)*[^\n]*(\n|\z)/m) then | ||
| @comments.clear | ||
@@ -733,0 +733,0 @@ rb_compile_error("embedded document meets end of file") |
@@ -126,3 +126,3 @@ require 'stringio' | ||
| class RubyParser < Racc::Parser | ||
| VERSION = '2.3.0' unless constants.include? "VERSION" # SIGH | ||
| VERSION = '2.3.1' unless constants.include? "VERSION" # SIGH | ||
@@ -296,13 +296,4 @@ attr_accessor :lexer, :in_def, :in_single, :file | ||
| def gettable(id) | ||
| raise "no: #{id.inspect}" if Sexp === id | ||
| id = id.to_sym if Sexp === id # HACK | ||
| id = id.to_sym if String === id # HACK | ||
| id = id.to_sym if String === id | ||
| return s(:self) if id == :self | ||
| return s(:nil) if id == :nil | ||
| return s(:true) if id == :true | ||
| return s(:false) if id == :false | ||
| return s(:str, self.file) if id == :"__FILE__" | ||
| return s(:lit, lexer.src.current_line) if id == :"__LINE__" | ||
| result = case id.to_s | ||
@@ -328,5 +319,5 @@ when /^@@/ then | ||
| return result if result | ||
| raise "identifier #{id.inspect} is not valid" unless result | ||
| raise "identifier #{id.inspect} is not valid" | ||
| result | ||
| end | ||
@@ -333,0 +324,0 @@ |
+1
-1
| = ruby_parser | ||
| home :: https://github.com/seattlerb/ruby_parser | ||
| rdoc :: http://parsetree.rubyforge.org/ruby_parser | ||
| rdoc :: http://docs.seattlerb.org/ruby_parser | ||
@@ -6,0 +6,0 @@ == DESCRIPTION: |
@@ -596,2 +596,9 @@ #!/usr/local/bin/ruby | ||
| def test_parse_line_newlines | ||
| rb = "true\n\n" | ||
| pt = s(:true) | ||
| assert_parse_line rb, pt, 1 | ||
| end | ||
| def test_parse_line_return | ||
@@ -598,0 +605,0 @@ rb = <<-RUBY |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet