aboutsummaryrefslogtreecommitdiff
path: root/src/MoonP/moon_parser.cpp
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-03-26 14:12:43 +0800
committerLi Jin <dragon-fly@qq.com>2020-03-26 14:12:43 +0800
commita97ca224f23b4101e44c099dbe29d1cc4a72c758 (patch)
treefeaa385e12a5406666c7a816ea90b9d7ecf9ecf5 /src/MoonP/moon_parser.cpp
parentde47e975ff05a7fa3b9d066db9d500b090990f11 (diff)
downloadyuescript-a97ca224f23b4101e44c099dbe29d1cc4a72c758.tar.gz
yuescript-a97ca224f23b4101e44c099dbe29d1cc4a72c758.tar.bz2
yuescript-a97ca224f23b4101e44c099dbe29d1cc4a72c758.zip
add REPL support for moonp.
Diffstat (limited to 'src/MoonP/moon_parser.cpp')
-rw-r--r--src/MoonP/moon_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/MoonP/moon_parser.cpp b/src/MoonP/moon_parser.cpp
index 872e30e..58f8fb3 100644
--- a/src/MoonP/moon_parser.cpp
+++ b/src/MoonP/moon_parser.cpp
@@ -646,7 +646,7 @@ std::string ParseInfo::errorMessage(std::string_view msg, const input_range* loc
646 int oldCol = loc->m_begin.m_col; 646 int oldCol = loc->m_begin.m_col;
647 int col = std::max(0, oldCol - 1); 647 int col = std::max(0, oldCol - 1);
648 auto it = begin; 648 auto it = begin;
649 for (int i = 0; i < oldCol; ++i) { 649 for (int i = 0; i < oldCol && it != end; ++i) {
650 if (*it > ASCII) { 650 if (*it > ASCII) {
651 ++col; 651 ++col;
652 } 652 }