Skip to content

Commit

Permalink
Perlito5 - fix README instructions; rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed Apr 27, 2012
1 parent 059f9af commit e518f94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README-perlito5
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
Running the tests using perl:
Running the tests using "perl":

# this will run all tests
prove -r -e 'perl -Ilib5 perlito5.pl -I./src5/lib ' t5

Running the tests using node.js:
Running the tests using "node.js":

# see below how to create perlito5.js
# this command will compile "perlito5.js"
perl -Ilib5 perlito5.pl -I./src5/lib -Cjs src5/util/perlito5.pl > perlito5.js

# this will run a single test script
node perlito5.js -Isrc5/lib t5/01-perlito/01-sanity.t

# this will run all tests
prove -r -e 'node perlito5.js -I./src5/lib' t5


Expand Down
11 changes: 10 additions & 1 deletion html/perlito5.js
Original file line number Diff line number Diff line change
Expand Up @@ -2128,7 +2128,16 @@ var p5100 = p5pkg['main'];
(v_self = (p5pkg["Perlito5::AST::Lit::Block"].shift([List__])));
var v_level = null;
(v_level = (p5pkg["Perlito5::AST::Lit::Block"].shift([List__])));
return (p5context([('p5for_lex(' + 'function () {' + String.fromCharCode(10) + p5str(p5call(p5context([p5call(p5pkg["Perlito5::Javascript::LexicalBlock"], "new", p5list_to_a('block', (v_self || (v_self = new p5HashRef({})))._hash_['stmts'], 'needs_return', 0, 'top_level', 0), p5want)], 0), "emit_javascript", [(p5num(v_level) + 2)], 0)) + String.fromCharCode(10) + p5str(p5pkg["Perlito5::Javascript"].tab([(p5num(v_level) + 1)], 0)) + '}, ' + '[0], ' + p5str(p5call(v_self, "emit_javascript_continue", [v_level], 0)) + ', ' + '"' + p5str(p5or((v_self || (v_self = new p5HashRef({})))._hash_['label'], function () { return '' })) + '"' + ')')], p5want));
var v_init = null;
(v_init = (''));
if ( (p5str((v_self || (v_self = new p5HashRef({})))._hash_['name']) == 'INIT') ) {
(function () {
var v_tmp = null;
(v_tmp = (('p5pkg.main._tmp' + p5str(p5pkg["Perlito5::Javascript"].get_label([], 0)))));
(v_init = ((p5str(p5pkg["Perlito5::Javascript"].tab([(p5num(v_level) + 2)], 0)) + ('if (' + p5str(v_tmp) + ') { return }; ' + p5str(v_tmp) + ' = 1;' + String.fromCharCode(10)))));
})();
};
return (p5context([('p5for_lex(' + 'function () {' + String.fromCharCode(10) + p5str(v_init) + p5str(p5call(p5context([p5call(p5pkg["Perlito5::Javascript::LexicalBlock"], "new", p5list_to_a('block', (v_self || (v_self = new p5HashRef({})))._hash_['stmts'], 'needs_return', 0, 'top_level', 0), p5want)], 0), "emit_javascript", [(p5num(v_level) + 2)], 0)) + String.fromCharCode(10) + p5str(p5pkg["Perlito5::Javascript"].tab([(p5num(v_level) + 1)], 0)) + '}, ' + '[0], ' + p5str(p5call(v_self, "emit_javascript_continue", [v_level], 0)) + ', ' + '"' + p5str(p5or((v_self || (v_self = new p5HashRef({})))._hash_['label'], function () { return '' })) + '"' + ')')], p5want));
});
p5make_sub("Perlito5::AST::Lit::Block", "emit_javascript_continue", function (List__, p5want) {
try {
Expand Down

0 comments on commit e518f94

Please sign in to comment.