From 4c75970512ead4d88ed88c62b2e7e05f32fedf29 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Sat, 29 Jun 2019 01:48:29 +0300 Subject: [PATCH] debugger: Detect error Former-commit-id: 1ea605eeab1a7b8e6645fe11d7b32c4c7dff0750 --- src/debugger/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debugger/parser.rs b/src/debugger/parser.rs index cc5fe59..3a028b5 100644 --- a/src/debugger/parser.rs +++ b/src/debugger/parser.rs @@ -4,7 +4,7 @@ use nom; use nom::branch::alt; use nom::bytes::complete::{tag, take_while_m_n}; use nom::character::complete::{alphanumeric1, char, digit1, multispace0, multispace1}; -use nom::combinator::{map, map_res}; +use nom::combinator::{map, map_res, cut}; use nom::error::{context, convert_error, ParseError, VerboseError}; use nom::multi::separated_list; use nom::sequence::{preceded, separated_pair, terminated, tuple}; @@ -81,7 +81,7 @@ fn parse_assignment<'a, E: ParseError<&'a str>>(i: &'a str) -> IResult<&str, Exp separated_pair( parse_value, preceded(multispace0, char('=')), - preceded(multispace0, parse_value), + cut(preceded(multispace0, parse_value)), ), |(lvalue, rvalue)| Expr::Assignment(lvalue, rvalue), ),