added origin argument to on_tokenize() to flag tokens from user input
if last character is an escape, it is added to the token text