trenni 2.1.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.travis.yml +1 -0
- data/Gemfile +9 -6
- data/README.md +66 -61
- data/Rakefile +3 -7
- data/ext/trenni/escape.c +150 -0
- data/ext/trenni/escape.h +15 -0
- data/ext/trenni/extconf.rb +5 -0
- data/ext/trenni/markup.c +280 -258
- data/ext/trenni/markup.rl +12 -7
- data/ext/trenni/tag.c +202 -0
- data/ext/trenni/tag.h +21 -0
- data/ext/trenni/template.c +29 -29
- data/ext/trenni/trenni.c +20 -3
- data/ext/trenni/trenni.h +84 -9
- data/lib/trenni/buffer.rb +20 -4
- data/lib/trenni/builder.rb +15 -38
- data/lib/trenni/entities.rb +0 -2
- data/lib/trenni/entities.trenni +0 -2
- data/lib/trenni/fallback/markup.rb +1576 -1584
- data/lib/trenni/fallback/markup.rl +9 -1
- data/lib/trenni/fallback/template.rb +744 -753
- data/lib/trenni/markup.rb +18 -25
- data/lib/trenni/native.rb +4 -1
- data/lib/trenni/parsers.rb +1 -1
- data/lib/trenni/tag.rb +130 -0
- data/lib/trenni/template.rb +35 -15
- data/lib/trenni/version.rb +1 -1
- data/spec/spec_helper.rb +29 -0
- data/spec/trenni/builder_spec.rb +1 -1
- data/spec/trenni/markup_parser_spec.rb +20 -0
- data/spec/trenni/markup_performance_spec.rb +26 -0
- data/spec/trenni/markup_spec.rb +3 -1
- data/spec/trenni/tag_spec.rb +69 -0
- data/spec/trenni/template_performance_spec.rb +18 -0
- data/spec/trenni/template_spec/interpolations.trenni +6 -0
- metadata +16 -4
- data/lib/trenni/substitutions.rb +0 -45
data/ext/trenni/markup.rl
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
|
2
2
|
#include "markup.h"
|
3
3
|
|
4
|
-
#include <ruby/encoding.h>
|
5
|
-
|
6
4
|
%%{
|
7
5
|
machine Trenni_markup_parser;
|
8
6
|
|
@@ -17,6 +15,7 @@
|
|
17
15
|
|
18
16
|
action pcdata_begin {
|
19
17
|
pcdata = Qnil;
|
18
|
+
has_entities = 0;
|
20
19
|
}
|
21
20
|
|
22
21
|
action pcdata_end {
|
@@ -26,7 +25,7 @@
|
|
26
25
|
}
|
27
26
|
|
28
27
|
action text_end {
|
29
|
-
rb_funcall(delegate, id_text, 1, pcdata);
|
28
|
+
rb_funcall(delegate, id_text, 1, Trenni_markup_safe(pcdata, has_entities));
|
30
29
|
}
|
31
30
|
|
32
31
|
action characters_begin {
|
@@ -50,7 +49,9 @@
|
|
50
49
|
action entity_name {
|
51
50
|
entity.end = p;
|
52
51
|
|
53
|
-
|
52
|
+
has_entities = 1;
|
53
|
+
|
54
|
+
Trenni_append(&pcdata, encoding,
|
54
55
|
rb_funcall(entities, id_key_get, 1, Trenni_token(entity, encoding))
|
55
56
|
);
|
56
57
|
}
|
@@ -58,6 +59,8 @@
|
|
58
59
|
action entity_hex {
|
59
60
|
entity.end = p;
|
60
61
|
|
62
|
+
has_entities = 1;
|
63
|
+
|
61
64
|
codepoint = strtoul(entity.begin, (char **)&entity.end, 16);
|
62
65
|
|
63
66
|
Trenni_append_codepoint(&pcdata, encoding, codepoint);
|
@@ -66,6 +69,8 @@
|
|
66
69
|
action entity_number {
|
67
70
|
entity.end = p;
|
68
71
|
|
72
|
+
has_entities = 1;
|
73
|
+
|
69
74
|
codepoint = strtoul(entity.begin, (char **)&entity.end, 10);
|
70
75
|
|
71
76
|
Trenni_append_codepoint(&pcdata, encoding, codepoint);
|
@@ -147,7 +152,7 @@
|
|
147
152
|
|
148
153
|
action attribute {
|
149
154
|
if (has_value == 1) {
|
150
|
-
rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), pcdata);
|
155
|
+
rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), Trenni_markup_safe(pcdata, has_entities));
|
151
156
|
} else if (has_value == 2) {
|
152
157
|
rb_funcall(delegate, id_attribute, 2, Trenni_token(identifier, encoding), empty_string);
|
153
158
|
} else {
|
@@ -196,14 +201,14 @@ VALUE Trenni_Native_parse_markup(VALUE self, VALUE buffer, VALUE delegate, VALUE
|
|
196
201
|
|
197
202
|
VALUE pcdata = Qnil;
|
198
203
|
|
199
|
-
VALUE empty_string = rb_obj_freeze(rb_enc_str_new(
|
204
|
+
VALUE empty_string = rb_obj_freeze(rb_enc_str_new(0, 0, encoding));
|
200
205
|
|
201
206
|
const char *s, *p, *pe, *eof;
|
202
207
|
unsigned long cs, top = 0, stack[2] = {0};
|
203
208
|
unsigned long codepoint = 0;
|
204
209
|
|
205
210
|
Token identifier = {0}, cdata = {0}, characters = {0}, entity = {0}, doctype = {0}, comment = {0}, instruction = {0};
|
206
|
-
unsigned self_closing = 0, has_value = 0;
|
211
|
+
unsigned self_closing = 0, has_value = 0, has_entities = 0;
|
207
212
|
|
208
213
|
s = p = RSTRING_PTR(string);
|
209
214
|
eof = pe = p + RSTRING_LEN(string);
|
data/ext/trenni/tag.c
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
#include "escape.h"
|
3
|
+
#include "tag.h"
|
4
|
+
|
5
|
+
VALUE Trenni_Tag_split(VALUE self, VALUE qualified_name) {
|
6
|
+
const char * begin = RSTRING_PTR(qualified_name);
|
7
|
+
const char * end = RSTRING_END(qualified_name);
|
8
|
+
|
9
|
+
const char * p = begin;
|
10
|
+
|
11
|
+
while (p != end) {
|
12
|
+
if (*p == ':') {
|
13
|
+
return rb_ary_new_from_args(2,
|
14
|
+
rb_enc_str_new(begin, p-begin, rb_enc_get(qualified_name)),
|
15
|
+
rb_enc_str_new(p+1, end-p-1, rb_enc_get(qualified_name))
|
16
|
+
);
|
17
|
+
}
|
18
|
+
|
19
|
+
p += 1;
|
20
|
+
}
|
21
|
+
|
22
|
+
return rb_ary_new_from_args(2, Qnil, qualified_name);
|
23
|
+
}
|
24
|
+
|
25
|
+
inline static int Trenni_Tag_valid_attributes(VALUE value) {
|
26
|
+
return (rb_type(value) == T_HASH) || (rb_type(value) == T_ARRAY);
|
27
|
+
}
|
28
|
+
|
29
|
+
// Key can be either symbol or string. This method efficiently converts either to a string.
|
30
|
+
inline static VALUE Trenni_Tag_key_string(VALUE key) {
|
31
|
+
if (SYMBOL_P(key)) {
|
32
|
+
return rb_sym2str(key);
|
33
|
+
}
|
34
|
+
|
35
|
+
StringValue(key);
|
36
|
+
return key;
|
37
|
+
}
|
38
|
+
|
39
|
+
inline static VALUE Trenni_Tag_prefix_key(VALUE prefix, VALUE key) {
|
40
|
+
VALUE buffer;
|
41
|
+
|
42
|
+
if (prefix == Qnil) {
|
43
|
+
return Trenni_Tag_key_string(key);
|
44
|
+
}
|
45
|
+
|
46
|
+
buffer = rb_str_dup(Trenni_Tag_key_string(prefix));
|
47
|
+
rb_str_cat_cstr(buffer, "-");
|
48
|
+
rb_str_append(buffer, Trenni_Tag_key_string(key));
|
49
|
+
|
50
|
+
return buffer;
|
51
|
+
}
|
52
|
+
|
53
|
+
VALUE Trenni_Tag_append_attributes(VALUE self, VALUE buffer, VALUE attributes, VALUE prefix);
|
54
|
+
|
55
|
+
static void Trenni_Tag_append_tag_attribute(VALUE buffer, VALUE key, VALUE value, VALUE prefix) {
|
56
|
+
// We skip over attributes with nil value:
|
57
|
+
if (value == Qnil || value == Qfalse) return;
|
58
|
+
|
59
|
+
// Modify key to contain the prefix:
|
60
|
+
key = Trenni_Tag_prefix_key(prefix, key);
|
61
|
+
|
62
|
+
if (Trenni_Tag_valid_attributes(value)) {
|
63
|
+
Trenni_Tag_append_attributes(Qnil, buffer, value, key);
|
64
|
+
} else {
|
65
|
+
rb_str_cat_cstr(buffer, " ");
|
66
|
+
rb_str_append(buffer, key);
|
67
|
+
|
68
|
+
if (value != Qtrue) {
|
69
|
+
rb_str_cat_cstr(buffer, "=\"");
|
70
|
+
Trenni_Markup_append(Qnil, buffer, value);
|
71
|
+
rb_str_cat_cstr(buffer, "\"");
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
struct TagAttributeForeachArg {
|
77
|
+
VALUE buffer;
|
78
|
+
VALUE prefix;
|
79
|
+
};
|
80
|
+
|
81
|
+
static int Trenni_Tag_append_tag_attribute_foreach(VALUE key, VALUE value, struct TagAttributeForeachArg * arg) {
|
82
|
+
Trenni_Tag_append_tag_attribute(arg->buffer, key, value, arg->prefix);
|
83
|
+
|
84
|
+
return ST_CONTINUE;
|
85
|
+
}
|
86
|
+
|
87
|
+
VALUE Trenni_Tag_append_attributes(VALUE self, VALUE buffer, VALUE attributes, VALUE prefix) {
|
88
|
+
int type = rb_type(attributes);
|
89
|
+
|
90
|
+
if (type == T_HASH) {
|
91
|
+
struct TagAttributeForeachArg arg = {buffer, prefix};
|
92
|
+
rb_hash_foreach(attributes, &Trenni_Tag_append_tag_attribute_foreach, (VALUE)&arg);
|
93
|
+
} else if (type == T_ARRAY) {
|
94
|
+
long i;
|
95
|
+
|
96
|
+
for (i = 0; i < RARRAY_LEN(attributes); i++) {
|
97
|
+
VALUE attribute = RARRAY_AREF(attributes, i);
|
98
|
+
VALUE key = RARRAY_AREF(attribute, 0);
|
99
|
+
VALUE value = RARRAY_AREF(attribute, 1);
|
100
|
+
|
101
|
+
Trenni_Tag_append_tag_attribute(buffer, key, value, prefix);
|
102
|
+
}
|
103
|
+
} else {
|
104
|
+
rb_raise(rb_eArgError, "expected hash or array for attributes");
|
105
|
+
}
|
106
|
+
|
107
|
+
return Qnil;
|
108
|
+
}
|
109
|
+
|
110
|
+
VALUE Trenni_Tag_append_tag(VALUE self, VALUE buffer, VALUE name, VALUE attributes, VALUE content) {
|
111
|
+
StringValue(name);
|
112
|
+
|
113
|
+
rb_str_cat_cstr(buffer, "<");
|
114
|
+
rb_str_buf_append(buffer, name);
|
115
|
+
|
116
|
+
Trenni_Tag_append_attributes(self, buffer, attributes, Qnil);
|
117
|
+
|
118
|
+
if (content == Qnil || content == Qfalse) {
|
119
|
+
rb_str_cat_cstr(buffer, "/>");
|
120
|
+
} else {
|
121
|
+
rb_str_cat_cstr(buffer, ">");
|
122
|
+
|
123
|
+
if (content != Qtrue) {
|
124
|
+
Trenni_Markup_append(self, buffer, content);
|
125
|
+
}
|
126
|
+
|
127
|
+
rb_str_cat_cstr(buffer, "</");
|
128
|
+
rb_str_buf_append(buffer, name);
|
129
|
+
rb_str_cat_cstr(buffer, ">");
|
130
|
+
}
|
131
|
+
|
132
|
+
return Qnil;
|
133
|
+
}
|
134
|
+
|
135
|
+
VALUE Trenni_Tag_format_tag(VALUE self, VALUE name, VALUE attributes, VALUE content) {
|
136
|
+
rb_encoding *encoding = rb_enc_get(name);
|
137
|
+
|
138
|
+
VALUE buffer = rb_enc_str_new(0, 0, encoding);
|
139
|
+
rb_str_reserve(buffer, 256);
|
140
|
+
|
141
|
+
Trenni_Tag_append_tag(self, buffer, name, attributes, content);
|
142
|
+
|
143
|
+
return buffer;
|
144
|
+
}
|
145
|
+
|
146
|
+
VALUE Trenni_Tag_write_opening_tag(VALUE self, VALUE buffer) {
|
147
|
+
VALUE name = rb_struct_getmember(self, id_name);
|
148
|
+
VALUE attributes = rb_struct_getmember(self, id_attributes);
|
149
|
+
VALUE closed = rb_struct_getmember(self, id_closed);
|
150
|
+
|
151
|
+
StringValue(name);
|
152
|
+
|
153
|
+
rb_str_reserve(buffer, RSTRING_LEN(name) + 256);
|
154
|
+
|
155
|
+
rb_str_cat_cstr(buffer, "<");
|
156
|
+
rb_str_buf_append(buffer, name);
|
157
|
+
|
158
|
+
Trenni_Tag_append_attributes(self, buffer, attributes, Qnil);
|
159
|
+
|
160
|
+
if (closed == Qtrue) {
|
161
|
+
rb_str_cat_cstr(buffer, "/>");
|
162
|
+
} else {
|
163
|
+
rb_str_cat_cstr(buffer, ">");
|
164
|
+
}
|
165
|
+
|
166
|
+
return Qnil;
|
167
|
+
}
|
168
|
+
|
169
|
+
VALUE Trenni_Tag_write_closing_tag(VALUE self, VALUE buffer) {
|
170
|
+
VALUE name = rb_struct_getmember(self, id_name);
|
171
|
+
|
172
|
+
StringValue(name);
|
173
|
+
|
174
|
+
rb_str_reserve(buffer, RSTRING_LEN(name) + 3);
|
175
|
+
|
176
|
+
rb_str_cat_cstr(buffer, "</");
|
177
|
+
rb_str_buf_append(buffer, name);
|
178
|
+
rb_str_cat_cstr(buffer, ">");
|
179
|
+
|
180
|
+
return Qnil;
|
181
|
+
}
|
182
|
+
|
183
|
+
void Init_trenni_tag() {
|
184
|
+
rb_undef_method(rb_class_of(rb_Trenni_Tag), "append_attributes");
|
185
|
+
rb_define_singleton_method(rb_Trenni_Tag, "append_attributes", Trenni_Tag_append_attributes, 3);
|
186
|
+
|
187
|
+
rb_undef_method(rb_class_of(rb_Trenni_Tag), "append_tag");
|
188
|
+
rb_define_singleton_method(rb_Trenni_Tag, "append_tag", Trenni_Tag_append_tag, 4);
|
189
|
+
|
190
|
+
rb_undef_method(rb_class_of(rb_Trenni_Tag), "format_tag");
|
191
|
+
rb_define_singleton_method(rb_Trenni_Tag, "format_tag", Trenni_Tag_format_tag, 3);
|
192
|
+
|
193
|
+
rb_undef_method(rb_class_of(rb_Trenni_Tag), "split");
|
194
|
+
rb_define_singleton_method(rb_Trenni_Tag, "split", Trenni_Tag_split, 1);
|
195
|
+
|
196
|
+
rb_undef_method(rb_Trenni_Tag, "write_opening_tag");
|
197
|
+
rb_define_method(rb_Trenni_Tag, "write_opening_tag", Trenni_Tag_write_opening_tag, 1);
|
198
|
+
|
199
|
+
rb_undef_method(rb_Trenni_Tag, "write_closing_tag");
|
200
|
+
rb_define_method(rb_Trenni_Tag, "write_closing_tag", Trenni_Tag_write_closing_tag, 1);
|
201
|
+
}
|
202
|
+
|
data/ext/trenni/tag.h
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
#pragma once
|
3
|
+
|
4
|
+
#include "trenni.h"
|
5
|
+
|
6
|
+
void Init_trenni_tag();
|
7
|
+
|
8
|
+
// Split a qualified name `namespace:name` into it's components. Return `[nil, name]` if no namespace is present.
|
9
|
+
// Usage: namespace, name = Trenni::Tag.split(qualified_name)
|
10
|
+
VALUE Trenni_Tag_split(VALUE self, VALUE name);
|
11
|
+
|
12
|
+
// Append attributes to the buffer, e.g. {data: {id: 10}} => ' data-id="10"'
|
13
|
+
VALUE Trenni_Tag_append_attributes(VALUE self, VALUE buffer, VALUE attributes, VALUE prefix);
|
14
|
+
// Append a full tag with content to the buffer.
|
15
|
+
VALUE Trenni_Tag_append_tag(VALUE self, VALUE buffer, VALUE name, VALUE attributes, VALUE content);
|
16
|
+
// Same as append but returns the result. Slightly less efficient.
|
17
|
+
VALUE Trenni_Tag_format_tag(VALUE self, VALUE name, VALUE attributes, VALUE content);
|
18
|
+
|
19
|
+
// Improve performance of Trenni::Tag#write_opening_tag and #write_closing_tag
|
20
|
+
VALUE Trenni_Tag_write_opening_tag(VALUE self, VALUE buffer);
|
21
|
+
VALUE Trenni_Tag_write_closing_tag(VALUE self, VALUE buffer);
|
data/ext/trenni/template.c
CHANGED
@@ -182,7 +182,7 @@ tr82:
|
|
182
182
|
{
|
183
183
|
expression.begin = p;
|
184
184
|
}
|
185
|
-
#line 53 "/
|
185
|
+
#line 53 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
186
186
|
{te = p;p--;{cs = 32;}}
|
187
187
|
goto _again;
|
188
188
|
st43:
|
@@ -524,7 +524,7 @@ case 20:
|
|
524
524
|
goto tr27;
|
525
525
|
goto st19;
|
526
526
|
tr31:
|
527
|
-
#line 17 "/
|
527
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
528
528
|
{{stack[top++] = 21; goto st21;}}
|
529
529
|
goto st21;
|
530
530
|
st21:
|
@@ -542,7 +542,7 @@ case 21:
|
|
542
542
|
}
|
543
543
|
goto st21;
|
544
544
|
tr47:
|
545
|
-
#line 13 "/
|
545
|
+
#line 13 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
546
546
|
{{stack[top++] = 22; goto st21;}}
|
547
547
|
goto st22;
|
548
548
|
st22:
|
@@ -558,13 +558,13 @@ case 22:
|
|
558
558
|
}
|
559
559
|
goto st22;
|
560
560
|
tr37:
|
561
|
-
#line 17 "/
|
561
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
562
562
|
{{stack[top++] = 23; goto st21;}}
|
563
563
|
goto st23;
|
564
564
|
tr39:
|
565
|
-
#line 13 "/
|
565
|
+
#line 13 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
566
566
|
{{stack[top++] = 23; goto st21;}}
|
567
|
-
#line 17 "/
|
567
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
568
568
|
{{stack[top++] = 23; goto st21;}}
|
569
569
|
goto st23;
|
570
570
|
st23:
|
@@ -593,7 +593,7 @@ case 24:
|
|
593
593
|
}
|
594
594
|
goto st23;
|
595
595
|
tr46:
|
596
|
-
#line 13 "/
|
596
|
+
#line 13 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
597
597
|
{{stack[top++] = 25; goto st21;}}
|
598
598
|
goto st25;
|
599
599
|
st25:
|
@@ -610,13 +610,13 @@ case 25:
|
|
610
610
|
}
|
611
611
|
goto st25;
|
612
612
|
tr43:
|
613
|
-
#line 17 "/
|
613
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
614
614
|
{{stack[top++] = 26; goto st21;}}
|
615
615
|
goto st26;
|
616
616
|
tr45:
|
617
|
-
#line 13 "/
|
617
|
+
#line 13 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
618
618
|
{{stack[top++] = 26; goto st21;}}
|
619
|
-
#line 17 "/
|
619
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
620
620
|
{{stack[top++] = 26; goto st21;}}
|
621
621
|
goto st26;
|
622
622
|
st26:
|
@@ -643,7 +643,7 @@ case 27:
|
|
643
643
|
}
|
644
644
|
goto st26;
|
645
645
|
tr44:
|
646
|
-
#line 20 "/
|
646
|
+
#line 20 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
647
647
|
{{cs = stack[--top];goto _again;}}
|
648
648
|
goto st49;
|
649
649
|
st49:
|
@@ -669,7 +669,7 @@ case 28:
|
|
669
669
|
}
|
670
670
|
goto st25;
|
671
671
|
tr38:
|
672
|
-
#line 20 "/
|
672
|
+
#line 20 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
673
673
|
{{cs = stack[--top];goto _again;}}
|
674
674
|
goto st50;
|
675
675
|
st50:
|
@@ -700,7 +700,7 @@ case 30:
|
|
700
700
|
goto st31;
|
701
701
|
goto st30;
|
702
702
|
tr49:
|
703
|
-
#line 17 "/
|
703
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
704
704
|
{{stack[top++] = 31; goto st21;}}
|
705
705
|
goto st31;
|
706
706
|
st31:
|
@@ -717,7 +717,7 @@ case 31:
|
|
717
717
|
}
|
718
718
|
goto st31;
|
719
719
|
tr50:
|
720
|
-
#line 20 "/
|
720
|
+
#line 20 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
721
721
|
{{cs = stack[--top];goto _again;}}
|
722
722
|
goto st51;
|
723
723
|
st51:
|
@@ -729,7 +729,7 @@ case 51:
|
|
729
729
|
goto st31;
|
730
730
|
goto st30;
|
731
731
|
tr32:
|
732
|
-
#line 20 "/
|
732
|
+
#line 20 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
733
733
|
{{cs = stack[--top];goto _again;}}
|
734
734
|
goto st52;
|
735
735
|
st52:
|
@@ -739,7 +739,7 @@ case 52:
|
|
739
739
|
#line 740 "template.c"
|
740
740
|
goto st0;
|
741
741
|
tr54:
|
742
|
-
#line 17 "/
|
742
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
743
743
|
{{stack[top++] = 32; goto st21;}}
|
744
744
|
goto st32;
|
745
745
|
st32:
|
@@ -757,7 +757,7 @@ case 32:
|
|
757
757
|
}
|
758
758
|
goto st32;
|
759
759
|
tr70:
|
760
|
-
#line 13 "/
|
760
|
+
#line 13 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
761
761
|
{{stack[top++] = 33; goto st21;}}
|
762
762
|
goto st33;
|
763
763
|
st33:
|
@@ -773,13 +773,13 @@ case 33:
|
|
773
773
|
}
|
774
774
|
goto st33;
|
775
775
|
tr60:
|
776
|
-
#line 17 "/
|
776
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
777
777
|
{{stack[top++] = 34; goto st21;}}
|
778
778
|
goto st34;
|
779
779
|
tr62:
|
780
|
-
#line 13 "/
|
780
|
+
#line 13 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
781
781
|
{{stack[top++] = 34; goto st21;}}
|
782
|
-
#line 17 "/
|
782
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
783
783
|
{{stack[top++] = 34; goto st21;}}
|
784
784
|
goto st34;
|
785
785
|
st34:
|
@@ -808,7 +808,7 @@ case 35:
|
|
808
808
|
}
|
809
809
|
goto st34;
|
810
810
|
tr69:
|
811
|
-
#line 13 "/
|
811
|
+
#line 13 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
812
812
|
{{stack[top++] = 36; goto st21;}}
|
813
813
|
goto st36;
|
814
814
|
st36:
|
@@ -825,13 +825,13 @@ case 36:
|
|
825
825
|
}
|
826
826
|
goto st36;
|
827
827
|
tr66:
|
828
|
-
#line 17 "/
|
828
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
829
829
|
{{stack[top++] = 37; goto st21;}}
|
830
830
|
goto st37;
|
831
831
|
tr68:
|
832
|
-
#line 13 "/
|
832
|
+
#line 13 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
833
833
|
{{stack[top++] = 37; goto st21;}}
|
834
|
-
#line 17 "/
|
834
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
835
835
|
{{stack[top++] = 37; goto st21;}}
|
836
836
|
goto st37;
|
837
837
|
st37:
|
@@ -867,7 +867,7 @@ tr67:
|
|
867
867
|
{
|
868
868
|
rb_funcall(delegate, id_expression, 1, Trenni_token(expression, encoding));
|
869
869
|
}
|
870
|
-
#line 21 "/
|
870
|
+
#line 21 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
871
871
|
{cs = 43;}
|
872
872
|
goto _again;
|
873
873
|
st53:
|
@@ -902,7 +902,7 @@ tr61:
|
|
902
902
|
{
|
903
903
|
rb_funcall(delegate, id_expression, 1, Trenni_token(expression, encoding));
|
904
904
|
}
|
905
|
-
#line 21 "/
|
905
|
+
#line 21 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
906
906
|
{cs = 43;}
|
907
907
|
goto _again;
|
908
908
|
st54:
|
@@ -933,7 +933,7 @@ case 41:
|
|
933
933
|
goto st42;
|
934
934
|
goto st41;
|
935
935
|
tr72:
|
936
|
-
#line 17 "/
|
936
|
+
#line 17 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
937
937
|
{{stack[top++] = 42; goto st21;}}
|
938
938
|
goto st42;
|
939
939
|
st42:
|
@@ -959,7 +959,7 @@ tr73:
|
|
959
959
|
{
|
960
960
|
rb_funcall(delegate, id_expression, 1, Trenni_token(expression, encoding));
|
961
961
|
}
|
962
|
-
#line 21 "/
|
962
|
+
#line 21 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
963
963
|
{cs = 43;}
|
964
964
|
goto _again;
|
965
965
|
st55:
|
@@ -980,7 +980,7 @@ tr55:
|
|
980
980
|
{
|
981
981
|
rb_funcall(delegate, id_expression, 1, Trenni_token(expression, encoding));
|
982
982
|
}
|
983
|
-
#line 21 "/
|
983
|
+
#line 21 "/home/samuel/Documents/Programming/ioquatix/trenni/parsers/trenni/template.rl"
|
984
984
|
{cs = 43;}
|
985
985
|
goto _again;
|
986
986
|
st56:
|