oga 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/changelog.md +9 -0
- data/ext/c/lexer.c +782 -621
- data/ext/c/lexer.rl +5 -5
- data/ext/java/org/liboga/xml/Lexer.java +265 -231
- data/ext/java/org/liboga/xml/Lexer.rl +3 -4
- data/ext/ragel/base_lexer.rl +23 -14
- data/lib/oga/version.rb +1 -1
- data/lib/oga/xml/lexer.rb +6 -7
- data/lib/oga/xml/text.rb +2 -2
- metadata +2 -2
data/ext/c/lexer.rl
CHANGED
@@ -19,11 +19,11 @@ on `ts` and `te`) so the macro ignores this argument.
|
|
19
19
|
#define advance_line(amount) \
|
20
20
|
rb_funcall(self, id_advance_line, 1, INT2NUM(amount));
|
21
21
|
|
22
|
-
#define
|
23
|
-
rb_funcall(self,
|
22
|
+
#define literal_html_element_p() \
|
23
|
+
rb_funcall(self, id_literal_html_element_p, 0) == Qtrue
|
24
24
|
|
25
25
|
ID id_advance_line;
|
26
|
-
ID
|
26
|
+
ID id_literal_html_element_p;
|
27
27
|
|
28
28
|
%%machine c_lexer;
|
29
29
|
|
@@ -173,8 +173,8 @@ void Init_liboga_xml_lexer()
|
|
173
173
|
VALUE mXML = rb_const_get(mOga, rb_intern("XML"));
|
174
174
|
VALUE cLexer = rb_define_class_under(mXML, "Lexer", rb_cObject);
|
175
175
|
|
176
|
-
id_advance_line
|
177
|
-
|
176
|
+
id_advance_line = rb_intern("advance_line");
|
177
|
+
id_literal_html_element_p = rb_intern("literal_html_element?");
|
178
178
|
|
179
179
|
rb_define_method(cLexer, "advance_native", oga_xml_lexer_advance, 1);
|
180
180
|
rb_define_method(cLexer, "reset_native", oga_xml_lexer_reset, 0);
|