Points lexer at input and resets its position. The lexer reads input in place, so keep it alive while you lex.
set_input_from_string :: (lexer: *J.Lexer, input: string)
Parameters
- lexer: *J.Lexer
- input: string
lexer: Lexer;
set_input_from_string(*lexer, "x := 1;");
assert(peek_next_token(*lexer).type == .IDENT);