From e5088ab940621155554a2e9455b57614c6ff015b Mon Sep 17 00:00:00 2001 From: murphy Date: Sun, 15 Oct 2006 09:08:50 +0000 Subject: Tests: - improved coderay_suite.rb (random and shuffled tests, max parameter, scannerlang->lang, sorted test cases...) - changed html output extension to .actual.html to svn:ignore them - fixed some tests (deleted $Id$ etc.) - made XHTML testcase work Scanners: - fixed HTML, Delphi and Nitro scanners thanks to new tests Engine: - Tokens#fix and #fix! added (yet to be tested) - improved Scanner#raise_inspect a bit Converted more files to UNIX format (go away, stinkin' \r!) --- lib/coderay/scanners/delphi.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/coderay/scanners/delphi.rb') diff --git a/lib/coderay/scanners/delphi.rb b/lib/coderay/scanners/delphi.rb index c141874..fb37f67 100644 --- a/lib/coderay/scanners/delphi.rb +++ b/lib/coderay/scanners/delphi.rb @@ -101,6 +101,7 @@ module Scanners state = :initial next elsif scan(/\n/) + kind = :error state = :initial else raise "else case \' reached; %p not handled." % peek(1), tokens @@ -114,7 +115,7 @@ module Scanners match ||= matched if $DEBUG and not kind raise_inspect 'Error token %p in line %d' % - [[match, kind], line], tokens + [[match, kind], line], tokens, state end raise_inspect 'Empty token', tokens unless match -- cgit v1.2.1