This PR removes the need to copy the program string when creating the lexer. This fixes the issue pointed to by the comment at src/lexer.rs:90. This is done by using a lifetime on the lexer. As far as I can see, this also removes the need to copy out of the program string for things such as if statements, parentheses and numbers.
Thanks for that ! I reviewed your PR and it seems pretty LGTM to me. I didn´t think that this type of fix could also fix the issue that I got in lexer.rs.
This PR removes the need to copy the program string when creating the lexer. This fixes the issue pointed to by the comment at
src/lexer.rs:90
. This is done by using a lifetime on the lexer. As far as I can see, this also removes the need to copy out of the program string for things such as if statements, parentheses and numbers.