Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Array slices #22

Merged
merged 8 commits into from
Nov 4, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update src/parser.rs
Co-authored-by: Marko Mikulicic <[email protected]>
  • Loading branch information
glyn and Marko Mikulicic committed Oct 20, 2020
commit 43f7113d2022c1447a481ec8efdc24204860e6ab
6 changes: 3 additions & 3 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

pub use crate::ast::*;
use crate::pest::Parser;
use slyce::{Index, Slice};
use slyce::Slice;

#[derive(Parser)]
#[grammar = "grammar.pest"]
Expand Down Expand Up @@ -96,8 +96,8 @@ fn parse_union_array_slice(matcher_rule: pest::iterators::Pair<Rule>) -> UnionEl
}

UnionElement::Slice(Slice {
start: start.map(Index::from).unwrap_or_default(),
end: end.map(Index::from).unwrap_or_default(),
start: start.into(),
end: end.into(),
step,
})
}
Expand Down