kwartz 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +340 -0
- data/ChangeLog +103 -0
- data/README.txt +37 -0
- data/bin/kwartz +12 -0
- data/doc-api/classes/Kwartz.html +218 -0
- data/doc-api/classes/Kwartz/Assertion.html +140 -0
- data/doc-api/classes/Kwartz/AssertionError.html +148 -0
- data/doc-api/classes/Kwartz/AttrInfo.html +320 -0
- data/doc-api/classes/Kwartz/BaseError.html +206 -0
- data/doc-api/classes/Kwartz/BaseTranslator.html +331 -0
- data/doc-api/classes/Kwartz/CharacterType.html +212 -0
- data/doc-api/classes/Kwartz/CommandOptionError.html +154 -0
- data/doc-api/classes/Kwartz/CommandOptions.html +374 -0
- data/doc-api/classes/Kwartz/Config.html +150 -0
- data/doc-api/classes/Kwartz/ConvertError.html +191 -0
- data/doc-api/classes/Kwartz/Converter.html +252 -0
- data/doc-api/classes/Kwartz/CssStyleParser.html +483 -0
- data/doc-api/classes/Kwartz/DocumentRuleset.html +369 -0
- data/doc-api/classes/Kwartz/ElementExpander.html +325 -0
- data/doc-api/classes/Kwartz/ElementInfo.html +312 -0
- data/doc-api/classes/Kwartz/ElementRuleset.html +582 -0
- data/doc-api/classes/Kwartz/EperlHandler.html +338 -0
- data/doc-api/classes/Kwartz/EperlTranslator.html +167 -0
- data/doc-api/classes/Kwartz/ErubisHandler.html +113 -0
- data/doc-api/classes/Kwartz/ErubisTranslator.html +168 -0
- data/doc-api/classes/Kwartz/ErubyHandler.html +337 -0
- data/doc-api/classes/Kwartz/ErubyTranslator.html +167 -0
- data/doc-api/classes/Kwartz/ExpandStatement.html +227 -0
- data/doc-api/classes/Kwartz/Expression.html +119 -0
- data/doc-api/classes/Kwartz/Handler.html +558 -0
- data/doc-api/classes/Kwartz/JstlHandler.html +657 -0
- data/doc-api/classes/Kwartz/JstlTranslator.html +226 -0
- data/doc-api/classes/Kwartz/KwartzError.html +146 -0
- data/doc-api/classes/Kwartz/Main.html +384 -0
- data/doc-api/classes/Kwartz/NativeExpression.html +236 -0
- data/doc-api/classes/Kwartz/NativeStatement.html +254 -0
- data/doc-api/classes/Kwartz/Node.html +156 -0
- data/doc-api/classes/Kwartz/ParseError.html +148 -0
- data/doc-api/classes/Kwartz/PhpHandler.html +333 -0
- data/doc-api/classes/Kwartz/PhpTranslator.html +194 -0
- data/doc-api/classes/Kwartz/PresentationLogicParser.html +830 -0
- data/doc-api/classes/Kwartz/PrintStatement.html +221 -0
- data/doc-api/classes/Kwartz/RailsHandler.html +587 -0
- data/doc-api/classes/Kwartz/RailsTranslator.html +167 -0
- data/doc-api/classes/Kwartz/RubyStyleParser.html +558 -0
- data/doc-api/classes/Kwartz/Ruleset.html +117 -0
- data/doc-api/classes/Kwartz/Statement.html +119 -0
- data/doc-api/classes/Kwartz/StrutsTranslator.html +190 -0
- data/doc-api/classes/Kwartz/TagInfo.html +314 -0
- data/doc-api/classes/Kwartz/TextConverter.html +270 -0
- data/doc-api/classes/Kwartz/Translator.html +318 -0
- data/doc-api/classes/Test.html +107 -0
- data/doc-api/classes/Test/Unit.html +101 -0
- data/doc-api/created.rid +1 -0
- data/doc-api/files/__/README_txt.html +150 -0
- data/doc-api/files/kwartz/assert_rb.html +114 -0
- data/doc-api/files/kwartz/binding/eperl_rb.html +116 -0
- data/doc-api/files/kwartz/binding/erubis_rb.html +116 -0
- data/doc-api/files/kwartz/binding/eruby_rb.html +115 -0
- data/doc-api/files/kwartz/binding/jstl_rb.html +116 -0
- data/doc-api/files/kwartz/binding/php_rb.html +116 -0
- data/doc-api/files/kwartz/binding/rails_rb.html +115 -0
- data/doc-api/files/kwartz/binding/struts_rb.html +117 -0
- data/doc-api/files/kwartz/config_rb.html +107 -0
- data/doc-api/files/kwartz/converter_rb.html +119 -0
- data/doc-api/files/kwartz/error_rb.html +107 -0
- data/doc-api/files/kwartz/main_rb.html +124 -0
- data/doc-api/files/kwartz/node_rb.html +114 -0
- data/doc-api/files/kwartz/parser_rb.html +117 -0
- data/doc-api/files/kwartz/translator_rb.html +115 -0
- data/doc-api/files/kwartz/util/assert-text-equal_rb.html +115 -0
- data/doc-api/files/kwartz/util/testcase-helper_rb.html +115 -0
- data/doc-api/files/kwartz_rb.html +120 -0
- data/doc-api/fr_class_index.html +75 -0
- data/doc-api/fr_file_index.html +45 -0
- data/doc-api/fr_method_index.html +216 -0
- data/doc-api/index.html +24 -0
- data/doc-api/rdoc-style.css +208 -0
- data/doc/docstyle.css +188 -0
- data/doc/p-pattern.html +1207 -0
- data/doc/reference.html +3396 -0
- data/doc/users-guide.html +1670 -0
- data/examples/breadcrumbs1/Makefile +15 -0
- data/examples/breadcrumbs1/breadcrumbs.eruby.plogic +27 -0
- data/examples/breadcrumbs1/breadcrumbs.html +12 -0
- data/examples/breadcrumbs1/breadcrumbs.jstl.plogic +28 -0
- data/examples/breadcrumbs1/breadcrumbs.php.plogic +26 -0
- data/examples/breadcrumbs1/main.php +12 -0
- data/examples/breadcrumbs1/main.rb +12 -0
- data/examples/breadcrumbs2/Makefile +15 -0
- data/examples/breadcrumbs2/breadcrumbs.eruby.plogic +22 -0
- data/examples/breadcrumbs2/breadcrumbs.html +14 -0
- data/examples/breadcrumbs2/breadcrumbs.jstl.plogic +24 -0
- data/examples/breadcrumbs2/breadcrumbs.php.plogic +23 -0
- data/examples/breadcrumbs2/main.php +12 -0
- data/examples/breadcrumbs2/main.rb +12 -0
- data/examples/pagelayout/Makefile +47 -0
- data/examples/pagelayout/content.eruby.plogic +44 -0
- data/examples/pagelayout/content.jstl.plogic +36 -0
- data/examples/pagelayout/content.php.plogic +37 -0
- data/examples/pagelayout/content1.html +36 -0
- data/examples/pagelayout/content2.html +29 -0
- data/examples/pagelayout/design.css +40 -0
- data/examples/pagelayout/layout.html +50 -0
- data/examples/pagelayout/main.php +55 -0
- data/examples/pagelayout/main.rb +77 -0
- data/examples/pagelayout/menu.eruby.plogic +14 -0
- data/examples/pagelayout/menu.html +13 -0
- data/examples/pagelayout/menu.jstl.plogic +14 -0
- data/examples/pagelayout/menu.php.plogic +14 -0
- data/examples/rails1/Makefile +36 -0
- data/examples/rails1/README +19 -0
- data/examples/rails1/application_helper.rb +31 -0
- data/examples/rails1/edit.html +28 -0
- data/examples/rails1/edit.plogic +10 -0
- data/examples/rails1/form.html +52 -0
- data/examples/rails1/form.plogic +33 -0
- data/examples/rails1/layout.plogic +15 -0
- data/examples/rails1/link_to.plogic +19 -0
- data/examples/rails1/list.html +48 -0
- data/examples/rails1/list.plogic +28 -0
- data/examples/rails1/new.html +27 -0
- data/examples/rails1/new.plogic +10 -0
- data/examples/rails1/reader.plogic +29 -0
- data/examples/rails1/show.html +40 -0
- data/examples/rails1/show.plogic +4 -0
- data/examples/rails1/writer.plogic +8 -0
- data/examples/table1/Makefile +15 -0
- data/examples/table1/main.php +11 -0
- data/examples/table1/main.rb +11 -0
- data/examples/table1/table1.eruby.plogic +21 -0
- data/examples/table1/table1.html +16 -0
- data/examples/table1/table1.jstl.plogic +21 -0
- data/examples/table1/table1.php.plogic +22 -0
- data/kwartz.gemspec +55 -0
- data/lib/kwartz.rb +13 -0
- data/lib/kwartz/assert.rb +31 -0
- data/lib/kwartz/binding/eperl.rb +166 -0
- data/lib/kwartz/binding/erubis.rb +61 -0
- data/lib/kwartz/binding/eruby.rb +164 -0
- data/lib/kwartz/binding/jstl.rb +334 -0
- data/lib/kwartz/binding/php.rb +167 -0
- data/lib/kwartz/binding/rails.rb +295 -0
- data/lib/kwartz/binding/struts.rb +109 -0
- data/lib/kwartz/config.rb +28 -0
- data/lib/kwartz/converter.rb +920 -0
- data/lib/kwartz/error.rb +41 -0
- data/lib/kwartz/main.rb +464 -0
- data/lib/kwartz/node.rb +454 -0
- data/lib/kwartz/parser.rb +903 -0
- data/lib/kwartz/translator.rb +153 -0
- data/lib/kwartz/util/assert-text-equal.rb +44 -0
- data/lib/kwartz/util/testcase-helper.rb +112 -0
- data/setup.rb +1331 -0
- data/test/test-compile.rb +36 -0
- data/test/test-compile.yaml +178 -0
- data/test/test-converter.rb +34 -0
- data/test/test-converter.yaml +127 -0
- data/test/test-directives.rb +32 -0
- data/test/test-directives.yaml +1411 -0
- data/test/test-main.rb +464 -0
- data/test/test-parser.rb +54 -0
- data/test/test-parser.yaml +394 -0
- data/test/test-rails.rb +28 -0
- data/test/test-rails.yaml +301 -0
- data/test/test-ruleset.rb +36 -0
- data/test/test-ruleset.yaml +804 -0
- data/test/test.rb +44 -0
- metadata +236 -0
@@ -0,0 +1,156 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Kwartz::Node</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Kwartz::Node</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/kwartz/node_rb.html">
|
59
|
+
kwartz/node.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
.[abstract] abstract class for <a href="Expression.html">Expression</a> and
|
84
|
+
<a href="Statement.html">Statement</a>
|
85
|
+
</p>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="method-list">
|
93
|
+
<h3 class="section-bar">Methods</h3>
|
94
|
+
|
95
|
+
<div class="name-list">
|
96
|
+
<a href="#M000048">accept</a>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<!-- if includes -->
|
104
|
+
|
105
|
+
<div id="section">
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<!-- if method_list -->
|
115
|
+
<div id="methods">
|
116
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
117
|
+
|
118
|
+
<div id="method-M000048" class="method-detail">
|
119
|
+
<a name="M000048"></a>
|
120
|
+
|
121
|
+
<div class="method-heading">
|
122
|
+
<a href="#M000048" class="method-signature">
|
123
|
+
<span class="method-name">accept</span><span class="method-args">(translator)</span>
|
124
|
+
</a>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div class="method-description">
|
128
|
+
<p>
|
129
|
+
.[abstract] accept visitor
|
130
|
+
</p>
|
131
|
+
<p><a class="source-toggle" href="#"
|
132
|
+
onclick="toggleCode('M000048-source');return false;">[Source]</a></p>
|
133
|
+
<div class="method-source-code" id="M000048-source">
|
134
|
+
<pre>
|
135
|
+
<span class="ruby-comment cmt"># File kwartz/node.rb, line 23</span>
|
136
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accept</span>(<span class="ruby-identifier">translator</span>)
|
137
|
+
<span class="ruby-identifier">not_implemented</span>
|
138
|
+
<span class="ruby-keyword kw">end</span>
|
139
|
+
</pre>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
|
148
|
+
</div>
|
149
|
+
|
150
|
+
|
151
|
+
<div id="validator-badges">
|
152
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
</body>
|
156
|
+
</html>
|
@@ -0,0 +1,148 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Kwartz::ParseError</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Kwartz::ParseError</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/kwartz/parser_rb.html">
|
59
|
+
kwartz/parser.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="BaseError.html">
|
69
|
+
BaseError
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="method-list">
|
88
|
+
<h3 class="section-bar">Methods</h3>
|
89
|
+
|
90
|
+
<div class="name-list">
|
91
|
+
<a href="#M000174">new</a>
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
</div>
|
96
|
+
|
97
|
+
|
98
|
+
<!-- if includes -->
|
99
|
+
|
100
|
+
<div id="section">
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<!-- if method_list -->
|
110
|
+
<div id="methods">
|
111
|
+
<h3 class="section-bar">Public Class methods</h3>
|
112
|
+
|
113
|
+
<div id="method-M000174" class="method-detail">
|
114
|
+
<a name="M000174"></a>
|
115
|
+
|
116
|
+
<div class="method-heading">
|
117
|
+
<a href="#M000174" class="method-signature">
|
118
|
+
<span class="method-name">new</span><span class="method-args">(message, filename, linenum, column)</span>
|
119
|
+
</a>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<div class="method-description">
|
123
|
+
<p><a class="source-toggle" href="#"
|
124
|
+
onclick="toggleCode('M000174-source');return false;">[Source]</a></p>
|
125
|
+
<div class="method-source-code" id="M000174-source">
|
126
|
+
<pre>
|
127
|
+
<span class="ruby-comment cmt"># File kwartz/parser.rb, line 48</span>
|
128
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">linenum</span>, <span class="ruby-identifier">column</span>)
|
129
|
+
<span class="ruby-keyword kw">super</span>
|
130
|
+
<span class="ruby-keyword kw">end</span>
|
131
|
+
</pre>
|
132
|
+
</div>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
|
137
|
+
</div>
|
138
|
+
|
139
|
+
|
140
|
+
</div>
|
141
|
+
|
142
|
+
|
143
|
+
<div id="validator-badges">
|
144
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
145
|
+
</div>
|
146
|
+
|
147
|
+
</body>
|
148
|
+
</html>
|
@@ -0,0 +1,333 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Kwartz::PhpHandler</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Kwartz::PhpHandler</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/kwartz/binding/php_rb.html">
|
59
|
+
kwartz/binding/php.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
<a href="Handler.html">
|
69
|
+
Handler
|
70
|
+
</a>
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</table>
|
74
|
+
</div>
|
75
|
+
<!-- banner header -->
|
76
|
+
|
77
|
+
<div id="bodyContent">
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div id="contextContent">
|
82
|
+
|
83
|
+
<div id="description">
|
84
|
+
<p>
|
85
|
+
directive handler for PHP
|
86
|
+
</p>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div id="method-list">
|
94
|
+
<h3 class="section-bar">Methods</h3>
|
95
|
+
|
96
|
+
<div class="name-list">
|
97
|
+
<a href="#M000021">directive_format</a>
|
98
|
+
<a href="#M000019">directive_pattern</a>
|
99
|
+
<a href="#M000022">handle</a>
|
100
|
+
<a href="#M000020">mapping_pattern</a>
|
101
|
+
</div>
|
102
|
+
</div>
|
103
|
+
|
104
|
+
</div>
|
105
|
+
|
106
|
+
|
107
|
+
<!-- if includes -->
|
108
|
+
|
109
|
+
<div id="section">
|
110
|
+
|
111
|
+
|
112
|
+
<div id="constants-list">
|
113
|
+
<h3 class="section-bar">Constants</h3>
|
114
|
+
|
115
|
+
<div class="name-list">
|
116
|
+
<table summary="Constants">
|
117
|
+
<tr class="top-aligned-row context-row">
|
118
|
+
<td class="context-item-name">PHP_DIRECTIVE_PATTERN</td>
|
119
|
+
<td>=</td>
|
120
|
+
<td class="context-item-value">/\A(\w+)(?:\s*\(\s*(.*)\))?\z/</td>
|
121
|
+
</tr>
|
122
|
+
<tr class="top-aligned-row context-row">
|
123
|
+
<td class="context-item-name">PHP_MAPPING_PATTERN</td>
|
124
|
+
<td>=</td>
|
125
|
+
<td class="context-item-value">/\A'([-:\w]+)',\s*(.*)\z/</td>
|
126
|
+
</tr>
|
127
|
+
<tr class="top-aligned-row context-row">
|
128
|
+
<td class="context-item-name">PHP_DIRECTIVE_FORMAT</td>
|
129
|
+
<td>=</td>
|
130
|
+
<td class="context-item-value">'%s(%s)'</td>
|
131
|
+
</tr>
|
132
|
+
</table>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<!-- if method_list -->
|
142
|
+
<div id="methods">
|
143
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
144
|
+
|
145
|
+
<div id="method-M000021" class="method-detail">
|
146
|
+
<a name="M000021"></a>
|
147
|
+
|
148
|
+
<div class="method-heading">
|
149
|
+
<a href="#M000021" class="method-signature">
|
150
|
+
<span class="method-name">directive_format</span><span class="method-args">()</span>
|
151
|
+
</a>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div class="method-description">
|
155
|
+
<p><a class="source-toggle" href="#"
|
156
|
+
onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
|
157
|
+
<div class="method-source-code" id="M000021-source">
|
158
|
+
<pre>
|
159
|
+
<span class="ruby-comment cmt"># File kwartz/binding/php.rb, line 39</span>
|
160
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directive_format</span>
|
161
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">PHP_DIRECTIVE_FORMAT</span>
|
162
|
+
<span class="ruby-keyword kw">end</span>
|
163
|
+
</pre>
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
<div id="method-M000019" class="method-detail">
|
169
|
+
<a name="M000019"></a>
|
170
|
+
|
171
|
+
<div class="method-heading">
|
172
|
+
<a href="#M000019" class="method-signature">
|
173
|
+
<span class="method-name">directive_pattern</span><span class="method-args">()</span>
|
174
|
+
</a>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
<div class="method-description">
|
178
|
+
<p><a class="source-toggle" href="#"
|
179
|
+
onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
|
180
|
+
<div class="method-source-code" id="M000019-source">
|
181
|
+
<pre>
|
182
|
+
<span class="ruby-comment cmt"># File kwartz/binding/php.rb, line 25</span>
|
183
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">directive_pattern</span>
|
184
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">PHP_DIRECTIVE_PATTERN</span>
|
185
|
+
<span class="ruby-keyword kw">end</span>
|
186
|
+
</pre>
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
<div id="method-M000022" class="method-detail">
|
192
|
+
<a name="M000022"></a>
|
193
|
+
|
194
|
+
<div class="method-heading">
|
195
|
+
<a href="#M000022" class="method-signature">
|
196
|
+
<span class="method-name">handle</span><span class="method-args">(directive_name, directive_arg, directive_str, stag_info, etag_info, cont_stmts, attr_info, append_exprs, stmt_list)</span>
|
197
|
+
</a>
|
198
|
+
</div>
|
199
|
+
|
200
|
+
<div class="method-description">
|
201
|
+
<p><a class="source-toggle" href="#"
|
202
|
+
onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
|
203
|
+
<div class="method-source-code" id="M000022-source">
|
204
|
+
<pre>
|
205
|
+
<span class="ruby-comment cmt"># File kwartz/binding/php.rb, line 44</span>
|
206
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle</span>(<span class="ruby-identifier">directive_name</span>, <span class="ruby-identifier">directive_arg</span>, <span class="ruby-identifier">directive_str</span>, <span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">etag_info</span>, <span class="ruby-identifier">cont_stmts</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>, <span class="ruby-identifier">stmt_list</span>)
|
207
|
+
<span class="ruby-identifier">ret</span> = <span class="ruby-keyword kw">super</span>
|
208
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ret</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ret</span>
|
209
|
+
|
210
|
+
<span class="ruby-identifier">d_name</span> = <span class="ruby-identifier">directive_name</span>
|
211
|
+
<span class="ruby-identifier">d_arg</span> = <span class="ruby-identifier">directive_arg</span>
|
212
|
+
<span class="ruby-identifier">d_str</span> = <span class="ruby-identifier">directive_str</span>
|
213
|
+
|
214
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">directive_name</span>
|
215
|
+
|
216
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:foreach</span>, <span class="ruby-identifier">:Foreach</span>, <span class="ruby-identifier">:FOREACH</span>, <span class="ruby-identifier">:list</span>, <span class="ruby-identifier">:List</span>, <span class="ruby-identifier">:LIST</span>
|
217
|
+
<span class="ruby-identifier">is_foreach</span> = <span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:foreach</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:Foreach</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:FOREACH</span>
|
218
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">d_arg</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A.*\s+as\s+(\$\w+)(?:\s*=>\s*\$\w+)?\z/</span>
|
219
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">convert_error</span>(<span class="ruby-node">"'#{d_str}': invalid argument."</span>, <span class="ruby-identifier">stag_info</span>.<span class="ruby-identifier">linenum</span>)
|
220
|
+
<span class="ruby-keyword kw">end</span>
|
221
|
+
<span class="ruby-identifier">loopvar</span> = <span class="ruby-identifier">$1</span>
|
222
|
+
<span class="ruby-identifier">counter</span> = <span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:foreach</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:list</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-node">"#{loopvar}_ctr"</span>
|
223
|
+
<span class="ruby-identifier">toggle</span> = <span class="ruby-identifier">d_name</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">:FOREACH</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">d_name</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">:LIST</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-node">"#{loopvar}_tgl"</span>
|
224
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">is_foreach</span>
|
225
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{counter} = 0;"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">counter</span>
|
226
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"foreach (#{d_arg}) {"</span>, <span class="ruby-identifier">:foreach</span>)
|
227
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">" #{counter}++;"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">counter</span>
|
228
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">" #{toggle} = #{counter}%2==0 ? #{self.even} : #{self.odd};"</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">toggle</span>
|
229
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_foreach</span>
|
230
|
+
<span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">cont_stmts</span>)
|
231
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_foreach</span>
|
232
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"}"</span>, <span class="ruby-identifier">:foreach</span>)
|
233
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">is_foreach</span>
|
234
|
+
|
235
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:while</span>, <span class="ruby-identifier">:loop</span>
|
236
|
+
<span class="ruby-identifier">is_while</span> = <span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:while</span>
|
237
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">is_while</span>
|
238
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"while (#{d_arg}) {"</span>, <span class="ruby-identifier">:while</span>)
|
239
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_while</span>
|
240
|
+
<span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">cont_stmts</span>)
|
241
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">is_while</span>
|
242
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"}"</span>, <span class="ruby-identifier">:while</span>)
|
243
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">is_while</span>
|
244
|
+
|
245
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:set</span>
|
246
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"#{d_arg};"</span>, <span class="ruby-identifier">:set</span>)
|
247
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>)
|
248
|
+
<span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">cont_stmts</span>)
|
249
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>)
|
250
|
+
|
251
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:if</span>
|
252
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"if (#{d_arg}) {"</span>, <span class="ruby-identifier">:if</span>)
|
253
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>)
|
254
|
+
<span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">cont_stmts</span>)
|
255
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>)
|
256
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"}"</span>, <span class="ruby-identifier">:if</span>)
|
257
|
+
|
258
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:elseif</span>, <span class="ruby-identifier">:else</span>
|
259
|
+
<span class="ruby-keyword kw">unless</span> <span class="ruby-operator">!</span><span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">st</span>=<span class="ruby-identifier">stmt_list</span>[<span class="ruby-value">-1</span>]).<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">NativeStatement</span>) <span class="ruby-operator">&&</span> (<span class="ruby-identifier">st</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:if</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">st</span>.<span class="ruby-identifier">kind</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:elseif</span>)
|
260
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">convert_error</span>(<span class="ruby-node">"'#{d_str}': previous statement should be 'if' or 'elsif'."</span>, <span class="ruby-identifier">stag_info</span>.<span class="ruby-identifier">linenum</span>)
|
261
|
+
<span class="ruby-keyword kw">end</span>
|
262
|
+
<span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">pop</span> <span class="ruby-comment cmt"># delete 'end'</span>
|
263
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:else</span>
|
264
|
+
<span class="ruby-identifier">kind</span> = <span class="ruby-identifier">:else</span>
|
265
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"} else {"</span>, <span class="ruby-identifier">:else</span>)
|
266
|
+
<span class="ruby-keyword kw">else</span>
|
267
|
+
<span class="ruby-identifier">kind</span> = <span class="ruby-identifier">:elseif</span>
|
268
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">"} elseif (#{d_arg}) {"</span>, <span class="ruby-identifier">:elseif</span>)
|
269
|
+
<span class="ruby-keyword kw">end</span>
|
270
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>)
|
271
|
+
<span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">cont_stmts</span>)
|
272
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>)
|
273
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"}"</span>, <span class="ruby-identifier">kind</span>)
|
274
|
+
|
275
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:default</span>, <span class="ruby-identifier">:Default</span>, <span class="ruby-identifier">:DEFAULT</span>
|
276
|
+
<span class="ruby-identifier">error_if_empty_tag</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">etag_info</span>, <span class="ruby-identifier">d_name</span>, <span class="ruby-identifier">d_arg</span>)
|
277
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">stag_info</span>, <span class="ruby-identifier">attr_info</span>, <span class="ruby-identifier">append_exprs</span>)
|
278
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new_without_newline</span>(<span class="ruby-node">"if (#{d_arg}) {"</span>, <span class="ruby-identifier">:if</span>)
|
279
|
+
<span class="ruby-identifier">flag_escape</span> = <span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:default</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">d_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">:Default</span>)
|
280
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">PrintStatement</span>.<span class="ruby-identifier">new</span>([ <span class="ruby-constant">NativeExpression</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">d_arg</span>, <span class="ruby-identifier">flag_escape</span>) ])
|
281
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new_without_newline</span>(<span class="ruby-value str">"} else {"</span>, <span class="ruby-identifier">:else</span>)
|
282
|
+
<span class="ruby-identifier">stmt_list</span>.<span class="ruby-identifier">concat</span>(<span class="ruby-identifier">cont_stmts</span>)
|
283
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">NativeStatement</span>.<span class="ruby-identifier">new_without_newline</span>(<span class="ruby-value str">"}"</span>, <span class="ruby-identifier">:else</span>)
|
284
|
+
<span class="ruby-identifier">stmt_list</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">build_print_stmt</span>(<span class="ruby-identifier">etag_info</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>)
|
285
|
+
|
286
|
+
<span class="ruby-keyword kw">else</span>
|
287
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
288
|
+
|
289
|
+
<span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt">#case</span>
|
290
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
291
|
+
|
292
|
+
<span class="ruby-keyword kw">end</span>
|
293
|
+
</pre>
|
294
|
+
</div>
|
295
|
+
</div>
|
296
|
+
</div>
|
297
|
+
|
298
|
+
<div id="method-M000020" class="method-detail">
|
299
|
+
<a name="M000020"></a>
|
300
|
+
|
301
|
+
<div class="method-heading">
|
302
|
+
<a href="#M000020" class="method-signature">
|
303
|
+
<span class="method-name">mapping_pattern</span><span class="method-args">()</span>
|
304
|
+
</a>
|
305
|
+
</div>
|
306
|
+
|
307
|
+
<div class="method-description">
|
308
|
+
<p><a class="source-toggle" href="#"
|
309
|
+
onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
|
310
|
+
<div class="method-source-code" id="M000020-source">
|
311
|
+
<pre>
|
312
|
+
<span class="ruby-comment cmt"># File kwartz/binding/php.rb, line 32</span>
|
313
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">mapping_pattern</span>
|
314
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">PHP_MAPPING_PATTERN</span>
|
315
|
+
<span class="ruby-keyword kw">end</span>
|
316
|
+
</pre>
|
317
|
+
</div>
|
318
|
+
</div>
|
319
|
+
</div>
|
320
|
+
|
321
|
+
|
322
|
+
</div>
|
323
|
+
|
324
|
+
|
325
|
+
</div>
|
326
|
+
|
327
|
+
|
328
|
+
<div id="validator-badges">
|
329
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
330
|
+
</div>
|
331
|
+
|
332
|
+
</body>
|
333
|
+
</html>
|