Clean up
This commit is contained in:
parent
d400b8bb6a
commit
71807c0777
@ -322,20 +322,18 @@ pub fn parser<'src>(
|
|||||||
just(Token::Control(Control::DoubleColon)),
|
just(Token::Control(Control::DoubleColon)),
|
||||||
);
|
);
|
||||||
|
|
||||||
let map_atom = choice((
|
let map_index = choice((
|
||||||
map.clone(),
|
map.clone(),
|
||||||
structure_instance.clone(),
|
structure_instance.clone(),
|
||||||
identifier_expression.clone(),
|
identifier_expression.clone(),
|
||||||
));
|
))
|
||||||
|
.then_ignore(just(Token::Control(Control::Dot)))
|
||||||
let map_index = map_atom
|
.then(positioned_identifier.clone())
|
||||||
.then_ignore(just(Token::Control(Control::Dot)))
|
.map_with(|(expression, identifier), state| {
|
||||||
.then(positioned_identifier.clone())
|
Expression::MapIndex(
|
||||||
.map_with(|(expression, identifier), state| {
|
Box::new(MapIndex::new(expression, identifier)).with_position(state.span()),
|
||||||
Expression::MapIndex(
|
)
|
||||||
Box::new(MapIndex::new(expression, identifier)).with_position(state.span()),
|
});
|
||||||
)
|
|
||||||
});
|
|
||||||
|
|
||||||
let atom = choice((
|
let atom = choice((
|
||||||
map_index.clone(),
|
map_index.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user