add tests for isntanceof AST item
AST enhancements

conditions inside a foreach statement were not being added to the AST
AST enhancements to closures

closure parameters and lexical variables now have an extra
flag for determining if they were passed by reference