Added "width= and height=" to symbols exported to html;

Added a backtrace function to the script evaluator, error messages now include a 'stack trace' of functions that were called.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@446 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-29 19:44:42 +00:00
parent 14b68de6cb
commit 35ec0ce63d
7 changed files with 123 additions and 21 deletions
+4 -4
View File
@@ -426,11 +426,11 @@ void parseExpr(TokenIterator& input, Script& script, Precedence minPrec) {
unsigned int jmpElse, jmpEnd;
parseOper(input, script, PREC_AND); // AAA
jmpElse = script.getLabel(); // jmp_else:
script.addInstruction(I_JUMP_IF_NOT, 0xFFFF); // jnz lbl_else
script.addInstruction(I_JUMP_IF_NOT, 0xFFFFFFFF); // jnz lbl_else
expectToken(input, _("then")); // then
parseOper(input, script, PREC_SET); // BBB
jmpEnd = script.getLabel(); // jmp_end:
script.addInstruction(I_JUMP, 0xFFFF); // jump lbl_end
script.addInstruction(I_JUMP, 0xFFFFFFFF); // jump lbl_end
script.comeFrom(jmpElse); // lbl_else:
if (input.peek() == _("else")) { // else
input.read();
@@ -455,7 +455,7 @@ void parseExpr(TokenIterator& input, Script& script, Precedence minPrec) {
script.addInstruction(I_UNARY, I_ITERATOR_C); // iterator_collection
script.addInstruction(I_PUSH_CONST, script_nil); // push nil
lblStart = script.getLabel(); // lbl_start:
script.addInstruction(I_LOOP, 0xFFFF); // loop
script.addInstruction(I_LOOP, 0xFFFFFFFF); // loop
expectToken(input, _("do")); // do
script.addInstruction(I_SET_VAR,
string_to_variable(name.value));// set name
@@ -473,7 +473,7 @@ void parseExpr(TokenIterator& input, Script& script, Precedence minPrec) {
script.addInstruction(I_BINARY, I_ITERATOR_R); // iterator_range
script.addInstruction(I_PUSH_CONST, script_nil); // push nil
lblStart = script.getLabel(); // lbl_start:
script.addInstruction(I_LOOP, 0xFFFF); // loop
script.addInstruction(I_LOOP, 0xFFFFFFFF); // loop
expectToken(input, _("do")); // do
script.addInstruction(I_SET_VAR,
string_to_variable(name.value));// set name