Skip to content

Commit e518f94

Browse files
committed
Perlito5 - fix README instructions; rebuild
1 parent 059f9af commit e518f94

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

README-perlito5

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
Running the tests using perl:
1+
Running the tests using "perl":
22

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

5-
Running the tests using node.js:
6+
Running the tests using "node.js":
67

7-
# see below how to create perlito5.js
8+
# this command will compile "perlito5.js"
9+
perl -Ilib5 perlito5.pl -I./src5/lib -Cjs src5/util/perlito5.pl > perlito5.js
10+
11+
# this will run a single test script
812
node perlito5.js -Isrc5/lib t5/01-perlito/01-sanity.t
913

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

1217

html/perlito5.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,16 @@ var p5100 = p5pkg['main'];
21282128
(v_self = (p5pkg["Perlito5::AST::Lit::Block"].shift([List__])));
21292129
var v_level = null;
21302130
(v_level = (p5pkg["Perlito5::AST::Lit::Block"].shift([List__])));
2131-
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));
2131+
var v_init = null;
2132+
(v_init = (''));
2133+
if ( (p5str((v_self || (v_self = new p5HashRef({})))._hash_['name']) == 'INIT') ) {
2134+
(function () {
2135+
var v_tmp = null;
2136+
(v_tmp = (('p5pkg.main._tmp' + p5str(p5pkg["Perlito5::Javascript"].get_label([], 0)))));
2137+
(v_init = ((p5str(p5pkg["Perlito5::Javascript"].tab([(p5num(v_level) + 2)], 0)) + ('if (' + p5str(v_tmp) + ') { return }; ' + p5str(v_tmp) + ' = 1;' + String.fromCharCode(10)))));
2138+
})();
2139+
};
2140+
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));
21322141
});
21332142
p5make_sub("Perlito5::AST::Lit::Block", "emit_javascript_continue", function (List__, p5want) {
21342143
try {

0 commit comments

Comments
 (0)