angle brackets
This commit is contained in:
parent
049132b6ee
commit
43e40b61e3
3 changed files with 30 additions and 6 deletions
|
|
@ -264,7 +264,8 @@ impl<'a> Token<'a> {
|
|||
Path::parse().map(Self::Path),
|
||||
AnyString::parse().map(Self::String),
|
||||
delimited,
|
||||
Atom::parse(alt((Separator::parse().value(""), ")", "]", "}"))).map(Self::Atom),
|
||||
Atom::parse(alt((Separator::parse().value(""), ")", "]", "}", ">")))
|
||||
.map(Self::Atom),
|
||||
)),
|
||||
)
|
||||
}
|
||||
|
|
@ -313,13 +314,14 @@ impl<'a> Delimited<'a> {
|
|||
"delimited",
|
||||
(
|
||||
opt((
|
||||
Atom::parse(alt(("(", "[", "{", Separator::parse().value("")))),
|
||||
Atom::parse(alt(("(", "[", "{", "<", Separator::parse().value("")))),
|
||||
Space::parse(),
|
||||
)),
|
||||
alt((
|
||||
literal('(').map(|_| literal(')').value(Delimiter::Paren)),
|
||||
literal('[').map(|_| literal(']').value(Delimiter::Bracket)),
|
||||
literal('{').map(|_| literal('}').value(Delimiter::Brace)),
|
||||
literal('<').map(|_| literal('>').value(Delimiter::Angle)),
|
||||
))
|
||||
.flat_map(|end| Segments::parse(end)),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue