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:
1 parent
4d7f224892
commit
81edce2eb8
4 files changed
+47
-15
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user