Skip to content

Commit

Permalink
Improve string_literal() panic message
Browse files Browse the repository at this point in the history
  • Loading branch information
ebkalderon committed Mar 15, 2020
1 parent 8c1a3d7 commit 8175c19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nix-parser2/src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ fn string_literal<'a>(mode: Mode) -> impl Fn(LocatedSpan<'a>) -> IResult<Token>
let end_tag = terminated(tag("''"), peek(none_of("'$")));
many_till_ne(escape, alt((end_tag, recognize(interpolate))))(input)?
}
_ => panic!("string_literal() called outside string lexer state"),
_ => panic!("string_literal() called outside String lexer mode"),
};

let token_kind = TokenKind::StringLiteral;
Expand Down

0 comments on commit 8175c19

Please sign in to comment.