diff options
author | Li Jin <dragon-fly@qq.com> | 2020-01-28 01:19:27 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-01-28 01:19:27 +0800 |
commit | 9d74b1c7c76992634ef6649fa3de15e4e47ab1fe (patch) | |
tree | 91b00108601a21e403237b8e063e0cc4e39a62cf /src | |
parent | fb47c11bd942c83317f1f9a2e255535649401cbf (diff) | |
download | yuescript-9d74b1c7c76992634ef6649fa3de15e4e47ab1fe.tar.gz yuescript-9d74b1c7c76992634ef6649fa3de15e4e47ab1fe.tar.bz2 yuescript-9d74b1c7c76992634ef6649fa3de15e4e47ab1fe.zip |
fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/MoonP/parser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/MoonP/parser.cpp b/src/MoonP/parser.cpp index 19c0068..94f80af 100644 --- a/src/MoonP/parser.cpp +++ b/src/MoonP/parser.cpp | |||
@@ -824,7 +824,7 @@ bool _context::parse_non_term(rule &r) { | |||
824 | rule::_state old_state = r.m_state; | 824 | rule::_state old_state = r.m_state; |
825 | 825 | ||
826 | //success/failure result | 826 | //success/failure result |
827 | bool ok; | 827 | bool ok = false; |
828 | 828 | ||
829 | //compute the new position | 829 | //compute the new position |
830 | size_t new_pos = m_pos.m_it - m_begin; | 830 | size_t new_pos = m_pos.m_it - m_begin; |
@@ -927,7 +927,7 @@ bool _context::parse_term(rule &r) { | |||
927 | rule::_state old_state = r.m_state; | 927 | rule::_state old_state = r.m_state; |
928 | 928 | ||
929 | //success/failure result | 929 | //success/failure result |
930 | bool ok; | 930 | bool ok = false; |
931 | 931 | ||
932 | //compute the new position | 932 | //compute the new position |
933 | size_t new_pos = m_pos.m_it - m_begin; | 933 | size_t new_pos = m_pos.m_it - m_begin; |
@@ -1026,7 +1026,7 @@ bool _context::parse_term(rule &r) { | |||
1026 | 1026 | ||
1027 | //parse non-term rule internal. | 1027 | //parse non-term rule internal. |
1028 | bool _context::_parse_non_term(rule &r) { | 1028 | bool _context::_parse_non_term(rule &r) { |
1029 | bool ok; | 1029 | bool ok = false; |
1030 | if (_private::get_parse_proc(r)) { | 1030 | if (_private::get_parse_proc(r)) { |
1031 | pos b = m_pos; | 1031 | pos b = m_pos; |
1032 | ok = _private::get_expr(r)->parse_non_term(*this); | 1032 | ok = _private::get_expr(r)->parse_non_term(*this); |
@@ -1043,7 +1043,7 @@ bool _context::_parse_non_term(rule &r) { | |||
1043 | 1043 | ||
1044 | //parse term rule internal. | 1044 | //parse term rule internal. |
1045 | bool _context::_parse_term(rule &r) { | 1045 | bool _context::_parse_term(rule &r) { |
1046 | bool ok; | 1046 | bool ok = false; |
1047 | if (_private::get_parse_proc(r)) { | 1047 | if (_private::get_parse_proc(r)) { |
1048 | pos b = m_pos; | 1048 | pos b = m_pos; |
1049 | ok = _private::get_expr(r)->parse_term(*this); | 1049 | ok = _private::get_expr(r)->parse_term(*this); |