24:5c9d8a65c87d | 25:9e62bc13b30d |
---|---|
9 var OP_CALL = 28; | 9 var OP_CALL = 28; |
10 var OP_RETURN = 30; | 10 var OP_RETURN = 30; |
11 var OP_CLOSURE = 36; | 11 var OP_CLOSURE = 36; |
12 | 12 |
13 var debugMode = false; | 13 var debugMode = false; |
14 var rawExceptions = true; | |
14 | 15 |
15 function LValue(type, value) | 16 function LValue(type, value) |
16 { | 17 { |
17 this.type = type||"nil"; | 18 this.type = type||"nil"; |
18 this.value = value||null; | 19 this.value = value||null; |
369 | 370 |
370 default_environment.setIndex(LValueFromString("print"), LValueFromFunction(print)); | 371 default_environment.setIndex(LValueFromString("print"), LValueFromFunction(print)); |
371 | 372 |
372 var f = new LFunction(c, default_environment); | 373 var f = new LFunction(c, default_environment); |
373 | 374 |
374 try{ | 375 if(rawExceptions) |
375 testvm.run(f); | 376 testvm.run(f); |
376 } | 377 else |
377 catch(e) | 378 { |
378 { | 379 try{ |
379 print("Error: " + e); | 380 testvm.run(f); |
380 } | 381 } |
382 catch(e) | |
383 { | |
384 print("Error: " + e); | |
385 } | |
386 } |