Skip to content

Commit 03515db

Browse files
committed
Remove unused YaccGrammarErrorKind variants.
1 parent 1d62f87 commit 03515db

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

cfgrammar/src/lib/yacc/parser.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ pub enum YaccGrammarErrorKind {
6464
UnknownEPP(String),
6565
ExpectedInput(char),
6666
InvalidYaccKind,
67-
InvalidYaccKindNamespace,
68-
InvalidActionKind,
69-
InvalidActionKindNamespace,
70-
InvalidGrmtoolsSectionEntry,
71-
DuplicateGrmtoolsSectionEntry,
72-
MissingGrmtoolsSection,
7367
Header(HeaderErrorKind, SpansKind),
7468
}
7569

@@ -157,17 +151,7 @@ impl fmt::Display for YaccGrammarErrorKind {
157151
name
158152
)
159153
}
160-
YaccGrammarErrorKind::MissingGrmtoolsSection => "Missing '%grmtools' section",
161-
YaccGrammarErrorKind::DuplicateGrmtoolsSectionEntry => {
162-
"Duplicate entry in %grmtools section"
163-
}
164-
YaccGrammarErrorKind::InvalidGrmtoolsSectionEntry => {
165-
"Invalid entry in %grmtools section"
166-
}
167154
YaccGrammarErrorKind::InvalidYaccKind => "Invalid yacc kind",
168-
YaccGrammarErrorKind::InvalidYaccKindNamespace => "Invalid yacc kind namespace",
169-
YaccGrammarErrorKind::InvalidActionKind => "Invalid action kind",
170-
YaccGrammarErrorKind::InvalidActionKindNamespace => "Invalid action kind namespace",
171155
YaccGrammarErrorKind::Header(hk, _) => &format!("Error in '%grmtools' {}", hk),
172156
};
173157
write!(f, "{}", s)
@@ -278,12 +262,7 @@ impl Spanned for YaccGrammarError {
278262
| YaccGrammarErrorKind::UnknownRuleRef(_)
279263
| YaccGrammarErrorKind::UnknownToken(_)
280264
| YaccGrammarErrorKind::NoPrecForToken(_)
281-
| YaccGrammarErrorKind::MissingGrmtoolsSection
282-
| YaccGrammarErrorKind::InvalidGrmtoolsSectionEntry
283265
| YaccGrammarErrorKind::InvalidYaccKind
284-
| YaccGrammarErrorKind::InvalidYaccKindNamespace
285-
| YaccGrammarErrorKind::InvalidActionKind
286-
| YaccGrammarErrorKind::InvalidActionKindNamespace
287266
| YaccGrammarErrorKind::ExpectedInput(_)
288267
| YaccGrammarErrorKind::UnknownEPP(_) => SpansKind::Error,
289268
YaccGrammarErrorKind::DuplicatePrecedence
@@ -293,7 +272,6 @@ impl Spanned for YaccGrammarError {
293272
| YaccGrammarErrorKind::DuplicateImplicitTokensDeclaration
294273
| YaccGrammarErrorKind::DuplicateStartDeclaration
295274
| YaccGrammarErrorKind::DuplicateActiontypeDeclaration
296-
| YaccGrammarErrorKind::DuplicateGrmtoolsSectionEntry
297275
| YaccGrammarErrorKind::DuplicateEPP => SpansKind::DuplicationError,
298276
YaccGrammarErrorKind::Header(_, spanskind) => spanskind,
299277
}

0 commit comments

Comments
 (0)