Server:
- location in source now passed on callback
- added handling and instrumentation of return statements
- added and modified handling of while- and for-loops and if-statements
Server:
- added handling and instrumentation of for-loops and sequences
- some cleanup
Server:
- changed the composition of the stack: now contains objects instead of simple numbers to handle different loop types and abnormal loop exits, e.g. through return statements (not yet implemented properly)
- better handling of for-loops: variable declarations (though bad style for javascript, but still valid code) can't be instrumented properly, so we pull the declaration out of the for loop into the line preceding the loop and turn the declaration in the loop into an assignment
- corrected instrumentation of sequences: the callback function call shouldn't be an expression statement (since a sequence consists of expressions, not expression statements (seemingly small, but important distinction)), so we take just the expression part of the statement and insert it into the sequence
- pulled handling for while-loops and if-statements out of the intstrumentTree-method
- some cleanup