update tokenizer to handle return and syntax error