Merge multiple CDATA tokens into a single token.

The tokens T_CDATA_START, T_TEXT and T_CDATA_END have been merged together into
T_CDATA.
This commit is contained in:
Yorick Peterse committed 2014-05-19 09:36:19 +02:00
1 parent a4fb5c1299
commit cd0f3380c4
4 files changed
+12 -45

No files matched your search

+4 -15
View File
@@ -120,21 +120,6 @@
cdata_start = '<![CDATA[';
cdata_end = ']]>';
action start_cdata {
callback_simple("on_cdata_start");
fcall cdata;
}
# Machine that for processing the contents of CDATA tags. Everything
# inside a CDATA tag is treated as plain text.
cdata := |*
any* cdata_end => {
callback("on_text", data, encoding, ts, te - 3);
callback_simple("on_cdata_end");
fret;
};
*|;
# Comments
#
# http://www.w3.org/TR/html-markup/syntax.html#comments
@@ -248,6 +233,10 @@
callback("on_comment", data, encoding, ts + 4, te - 3);
};
cdata_start any* cdata_end => {
callback("on_cdata", data, encoding, ts + 9, te - 3);
};
# Enter the body of the tag. If HTML mode is enabled and the current
# element is a void element we'll close it and bail out.
'>' => {