fix for windows newlines (#1834)

This commit is contained in:
water111 2022-09-01 22:44:43 -04:00 committed by GitHub
parent 5a21c823f5
commit 97637d7902
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -343,7 +343,8 @@ Token Reader::get_next_token(TextStream& stream) {
// Second - not a special token, so we read until we get a character that ends the token. // Second - not a special token, so we read until we get a character that ends the token.
while (stream.text_remains()) { while (stream.text_remains()) {
char next = stream.peek(); char next = stream.peek();
if (next == ' ' || next == '\n' || next == '\t' || next == ')' || next == ';' || next == '(') { if (next == ' ' || next == '\n' || next == '\t' || next == '\r' || next == ')' || next == ';' ||
next == '(') {
return t; return t;
} else { } else {
// not the end, so add to token. // not the end, so add to token.