Variable completion: use syntax tree to determine variables in scope.