From 97637d79023de5c8b05c22c10e925f2e89d31ead Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Thu, 1 Sep 2022 22:44:43 -0400 Subject: [PATCH] fix for windows newlines (#1834) --- common/goos/Reader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/goos/Reader.cpp b/common/goos/Reader.cpp index 4cf177955..93fd97629 100644 --- a/common/goos/Reader.cpp +++ b/common/goos/Reader.cpp @@ -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. while (stream.text_remains()) { 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; } else { // not the end, so add to token.