removing old stuff

This commit is contained in:
Folkert 2021-03-12 01:37:27 +01:00
parent f5d3845b14
commit 4f58c792e6
5 changed files with 85 additions and 385 deletions

View file

@ -2,8 +2,7 @@ use crate::ast::{EscapedChar, StrLiteral, StrSegment};
use crate::expr;
use crate::parser::Progress::*;
use crate::parser::{
allocated, ascii_char, loc, parse_utf8, specialize_ref, word1, BadInputError, EString, Parser,
State,
allocated, loc, parse_utf8, specialize_ref, word1, BadInputError, EString, Parser, State,
};
use bumpalo::collections::vec::Vec;
use bumpalo::Bump;
@ -233,9 +232,9 @@ pub fn parse<'a>() -> impl Parser<'a, StrLiteral<'a>, EString<'a>> {
// Parse an arbitrary expression, then give a
// canonicalization error if that expression variant
// is not allowed inside a string interpolation.
let (_progress, loc_expr, new_state) = specialize_ref(
EString::Format,
skip_second!(loc(allocated(expr::expr(0))), ascii_char(b')')),
let (_progress, loc_expr, new_state) = skip_second!(
specialize_ref(EString::Format, loc(allocated(expr::expr(0)))),
word1(b')', EString::FormatEnd)
)
.parse(arena, state)?;