Skip to content

Commit 8683e2b

Browse files
committed
update the parser options
1 parent 695bf07 commit 8683e2b

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

index.html

+8-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->
1111
<title>Glayzzle - The union between PHP and NodeJS</title>
1212
<meta name="viewport" content="width=device-width, initial-scale=1.0">
13-
<meta name="description" content="Run PHP with nodejs">
13+
<meta name="description" content="Parse PHP and extract AST with javascript">
1414
<meta name="author" content="Ioan CHIRIAC">
1515

1616
<!--stylesheets-->
@@ -79,7 +79,7 @@
7979
<div class="nav-collapse">
8080
<ul class="nav">
8181
<li class="current"><a href="#demo">Demo</a></li>
82-
<li><a href="https://github.com/glayzzle/php-parser/wiki">Documentation</a></li>
82+
<li><a href="https://github.com/glayzzle/php-parser/tree/master/docs">Documentation</a></li>
8383
<li><a href="https://github.com/glayzzle/php-parser/issues">Issues</a></li>
8484
<li><a href="/index.html#support">Contact</a></li>
8585
<li>
@@ -107,9 +107,7 @@
107107
<a href="https://gitter.im/glayzzle/Lobby"><img src="https://camo.githubusercontent.com/9e4e89c5b3434b12e74867c52ce897fc1380abcc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4749545445522d6a6f696e253230636861742d677265656e2e737667" alt="Gitter" data-canonical-src="https://img.shields.io/badge/GITTER-join%20chat-green.svg"></a>
108108
</p>
109109
<p>
110-
Parse PHP code from NodeJS and convert it to AST.
111-
This library is a standalone module of a larger
112-
project named <a href="http://glayzzle.com/">Glayzzle</a>.
110+
Parse PHP code with javascript and convert it to AST.
113111
</p>
114112
</div>
115113
</div>
@@ -167,13 +165,13 @@ <h1>Try it online</h1>
167165
</div>
168166
<p id="options">
169167
<label>
170-
<input type="checkbox" data-opt="locations"> Include positions
168+
<input type="checkbox" data-key="ast" data-opt="withPositions"> Include positions
171169
</label>
172170
<label>
173-
<input type="checkbox" data-opt="extractDoc"> Extract comments
171+
<input type="checkbox" data-key="parser" data-opt="extractDoc"> Extract comments
174172
</label>
175173
<label>
176-
<input type="checkbox" data-opt="suppressErrors"> Graceful errors
174+
<input type="checkbox" data-key="parser" data-opt="suppressErrors"> Graceful errors
177175
</label>
178176
</p>
179177
<div id="jsoneditor" style="width: 100%; height: 400px;"></div>
@@ -196,7 +194,7 @@ <h1>Try it online</h1>
196194
<script type="text/javascript" src="/js/main.js?v=1"></script>
197195
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/gist-embed/2.4/gist-embed.min.js"></script>
198196
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js"></script>
199-
<script type="text/javascript" src="https://rawgit.com/glayzzle/php-parser/master/dist/php-parser.min.js"></script>
197+
<script type="text/javascript" src="https://rawgit.com/glayzzle/php-parser/develop/dist/php-parser.min.js"></script>
200198
<script type="text/javascript" src="https://cdn.rawgit.com/josdejong/jsoneditor/master/dist/jsoneditor-minimalist.min.js"></script>
201199
<script>
202200
var parser = require('php-parser');
@@ -225,7 +223,7 @@ <h1>Try it online</h1>
225223
editor.on("change", refreshAst);
226224
refreshAst();
227225
$('[data-opt]').on('click', function() {
228-
options.parser[$(this).attr('data-opt')] = $(this).is(':checked');
226+
options.[$(this).attr('data-key')][$(this).attr('data-opt')] = $(this).is(':checked');
229227
refreshAst();
230228
});
231229
</script>

0 commit comments

Comments
 (0)