First request after an edit −19 % (§63.2, N1 of the 0.52.0 review): the flush split on the timing line (rebuild{lex parse defines analyze external lines publish documents}) named lex 29 + parse 26 of a 100 ms flush and no second lint or analysis; the lexer's two phases fused (the intermediate Vec<RawTok> gone), Parser::skip for the 178 bump() sites that discarded the token, a first-byte test in front of the operator table (tokenize 27.8 → 11.6 ms). Pinmux first menu after didChange 109 → 88 ms paired; every other row within noise; RSS not up. Token stream, diagnostics, AST and symbols digested over 4 807 files: 0 differ (re-derived by QA against a rebuilt 1b8723c); five gap fuzzers at their pins; corpus and opentitan byte-identical. Lead: an orphan trailing comment leads the next token instead of vanishing (unreachable, kept as a rule). QA: 16 attack tests, the flat-groups guard the harness relies on.
ci / checks (push) Successful in 1m16s
ci / corpus (push) Successful in 34s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
lucioandClaude Fable 5.1 committed 2026-09-12 03:11:59 -07:00
1 parent 1b8723ca1f
commit c82978c3db
30 files changed
+1513 -260

No files matched your search

+11 -11
View File
@@ -24,7 +24,7 @@ impl<'a> Parser<'a> {
let mut after_hash = Vec::new();
let mut after_delay = Vec::new();
let delay = if self.cur().is_sym("#") {
self.bump();
self.skip();
after_hash = self.take_gap();
let delay = self.parse_delay_value()?;
// The gap between the delay and the first left-hand side is the
@@ -82,7 +82,7 @@ impl<'a> Parser<'a> {
}
let mut comments =
Box::new(DriveStrengthComments { before_open: self.take_gap(), ..Default::default() });
self.bump(); // (
self.skip(); // (
comments.after_open = self.take_gap();
let first = self.bump().text;
// The gap after the first strength ends either at the `,` or at the
@@ -121,7 +121,7 @@ impl<'a> Parser<'a> {
// What is written just inside the `(` belongs to the first value; the
// gap before each `,` and the gap after it belong to the values either
// side of it.
self.bump();
self.skip();
let mut leading = self.take_gap();
let mut out: Vec<DelayValue> = Vec::new();
loop {
@@ -242,7 +242,7 @@ impl<'a> Parser<'a> {
/// `bind <target> [: <inst>, ...] <module> [#(...)] <name> (...);`
pub(super) fn parse_bind(&mut self) -> PResult<BindDirective> {
self.bump(); // `bind`
self.skip(); // `bind`
// The target is a bare string, so a comment written before it has no
// node to attach to: harvest it here, where source order is still
// known, rather than letting it drift onto the instance below.
@@ -250,7 +250,7 @@ impl<'a> Parser<'a> {
let start = self.here();
let mut target = vec![self.parse_path_segment()?];
while self.cur().is_sym(".") {
self.bump();
self.skip();
target.push(self.parse_path_segment()?);
}
let target_span = self.span_from(start);
@@ -278,7 +278,7 @@ impl<'a> Parser<'a> {
let start = self.here();
let mut text = self.expect_ident()?;
while self.cur().is_sym(".") {
self.bump();
self.skip();
let segment = self.expect_ident()?;
Self::push_path_segment(&mut text, &segment);
}
@@ -301,7 +301,7 @@ impl<'a> Parser<'a> {
let module_start = self.here();
let mut module = self.expect_ident()?;
while self.cur().is_sym("::") {
self.bump();
self.skip();
let segment = self.expect_ident()?;
Self::push_scope_segment(&mut module, &segment);
}
@@ -312,7 +312,7 @@ impl<'a> Parser<'a> {
let mut after_hash = Vec::new();
let mut param_directives = Vec::new();
if self.cur().is_sym("#") {
self.bump();
self.skip();
after_hash = self.take_gap();
self.expect_sym("(")?;
let mut list = Vec::new();
@@ -571,7 +571,7 @@ impl<'a> Parser<'a> {
// `.name(/* unused */)`: the comments were written inside
// these parens and are printed back inside them.
let inside = self.take_around(mark);
self.bump();
self.skip();
Some(self.expr_at(paren_start, ExprKind::Empty(inside)))
} else {
after_open = self.take_gap();
@@ -684,7 +684,7 @@ impl<'a> Parser<'a> {
let start = self.here();
let col = self.cur().col;
while self.pos < end_pos && !self.at_eof() {
self.bump();
self.skip();
}
let raw = self.verbatim_since(start, col);
self.expr_at(start, ExprKind::Verbatim(raw))
@@ -699,7 +699,7 @@ impl<'a> Parser<'a> {
let before_hash = self.take_before_open("#");
let mut after_hash = Vec::new();
let delay = if self.cur().is_sym("#") {
self.bump();
self.skip();
after_hash = self.take_gap();
self.parse_delay_values()?
} else {