diff options
author | Li Jin <dragon-fly@qq.com> | 2020-03-26 14:12:43 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-03-26 14:12:43 +0800 |
commit | a97ca224f23b4101e44c099dbe29d1cc4a72c758 (patch) | |
tree | feaa385e12a5406666c7a816ea90b9d7ecf9ecf5 /src/MoonP/moon_parser.cpp | |
parent | de47e975ff05a7fa3b9d066db9d500b090990f11 (diff) | |
download | yuescript-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.cpp | 2 |
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 | } |