Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Xanewok committed Mar 5, 2024
1 parent e97ce9a commit f41d7aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/codegen/grammar/src/parser_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ impl Visitable for TriviaParserDefinitionRef {
/// For ambiguous syntaxes this needs to be set to at least N, where N
/// is the token lookahead required to disambiguate the syntax.
///
// By default, we assume no lookahead is required to recover from
// unrecognized body between delimiters.
// By default, we assume no lookahead (0) is required to recover from
// unrecognized body between delimiters, so it's always triggered.
#[derive(Clone, Debug, Default)]
pub struct DelimitedRecoveryTokenThreshold(pub u8);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ pub struct FieldDelimiters {
/// How many tokens have to be matched to trigger the error recovery.
/// For ambiguous syntaxes this needs to be set to at least N, where N
/// is the token lookahead required to disambiguate the syntax.
///
/// By default, we assume no lookahead (0) is required to recover from
/// unrecognized body between delimiters, so it's always triggered.
pub tokens_matched_acceptance_threshold: Option<u8>,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ fn get_spanned_type(input: Type) -> Type {
}

// External types should also be wrapped in 'Spanned<T>':
"bool" | "u8" | "char" | "PathBuf" | "String" | "Version" => {
"bool" | "char" | "PathBuf" | "String" | "u8" | "Version" => {
parse_quote! {
crate::internals::Spanned<#input>
}
Expand Down

0 comments on commit f41d7aa

Please sign in to comment.