Fix typos
This commit is contained in:
parent
01df16ca9f
commit
b8552ec6c4
11 changed files with 17 additions and 17 deletions
|
|
@ -598,7 +598,7 @@ impl<'a> ParseTableBuilder<'a> {
|
|||
.unwrap();
|
||||
write!(&mut msg, "Possible interpretations:\n\n").unwrap();
|
||||
|
||||
let mut interpretions = conflicting_items
|
||||
let mut interpretations = conflicting_items
|
||||
.iter()
|
||||
.map(|item| {
|
||||
let mut line = String::new();
|
||||
|
|
@ -652,13 +652,13 @@ impl<'a> ParseTableBuilder<'a> {
|
|||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let max_interpretation_length = interpretions
|
||||
let max_interpretation_length = interpretations
|
||||
.iter()
|
||||
.map(|i| i.0.chars().count())
|
||||
.max()
|
||||
.unwrap();
|
||||
interpretions.sort_unstable();
|
||||
for (i, (line, prec_suffix)) in interpretions.into_iter().enumerate() {
|
||||
interpretations.sort_unstable();
|
||||
for (i, (line, prec_suffix)) in interpretations.into_iter().enumerate() {
|
||||
write!(&mut msg, " {}:", i + 1).unwrap();
|
||||
msg += &line;
|
||||
if let Some(prec_suffix) = prec_suffix {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ pub(crate) enum Rule {
|
|||
|
||||
// Because tokens are represented as small (~400 max) unsigned integers,
|
||||
// sets of tokens can be efficiently represented as bit vectors with each
|
||||
// index correspoding to a token, and each value representing whether or not
|
||||
// index corresponding to a token, and each value representing whether or not
|
||||
// the token is present in the set.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct TokenSet {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue