Skip to content

Commit f9ba5b0

Browse files
author
cydu
committed
add io and improve lexer
1 parent d6c2666 commit f9ba5b0

File tree

2 files changed

+97
-91
lines changed

2 files changed

+97
-91
lines changed

src/js/console.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,16 @@ $(document).ready(function() {
6262

6363
Stk.interpret_strings(prelude);
6464

65+
var io = {
66+
write: function(out) {
67+
jqc.Write(out, 'jqconsole-output');
68+
}
69+
};
70+
6571
var handler = function(command) {
6672
if( command ) {
6773
try {
68-
Stk.interpret_string(command, jqc);
74+
Stk.interpret_string(command, io);
6975
print_stack(jqc);
7076
} catch(e) {
7177
jqc.Write('ERROR: ' + e.message + '\n', 'jqconsole-error');

0 commit comments

Comments
 (0)