Fixed lexing of XML comments.

The previous setup would consume too much. For example the following HTML:

    <a><!--foo--><b><!--bar--></b></a>

would result in the following T_COMMENT token:

    "foo--><b><!--bar"

The new setup requires the marking of a start position. I'm not a huge fan of
this but there doesn't appear to be a way around this.
This commit is contained in:
Yorick Peterse committed 2014-08-15 20:42:32 +02:00
1 parent 4d7f224892
commit 81edce2eb8
4 files changed
+47 -15

No files matched your search

+6 -5
View File
@@ -90,11 +90,12 @@ public class Lexer extends RubyObject
byte[] data = rb_str.getBytes();
int ts = 0;
int te = 0;
int p = 0;
int pe = data.length;
int eof = data.length;
int ts = 0;
int te = 0;
int p = 0;
int mark = 0;
int pe = data.length;
int eof = data.length;
%% write exec;