From 906375e3f0ac859192ef63e165ec3e6d736c82ac Mon Sep 17 00:00:00 2001 From: Kevin Longe <273747162+kvlonge@users.noreply.github.com> Date: Thu, 12 Nov 2026 01:29:29 +0000 Subject: [PATCH] fix(syntax): keep the parse in parse_strict so the instruction guard counts it parse_strict only called strict_statements, so it compiled to a single jump, and the release pull request's CI build counted nothing in it: callgrind's collection starts at parse_strict's entry. strict_statements is now inlined into it, its one caller, and parse_strict is never inlined into a caller. --- .../sqlquack-syntax-snowflake/src/modes/main/parse_strict.rs | 3 ++- .../src/parser/main/strict_statements.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/sqlquack-syntax-snowflake/src/modes/main/parse_strict.rs b/crates/sqlquack-syntax-snowflake/src/modes/main/parse_strict.rs index 0030f04c5..4257157ac 100644 --- a/crates/sqlquack-syntax-snowflake/src/modes/main/parse_strict.rs +++ b/crates/sqlquack-syntax-snowflake/src/modes/main/parse_strict.rs @@ -6,7 +6,8 @@ use sqlquack_syntax::expressions::tree::models::Expression; use sqlquack_syntax::guard::models::ParseOptions; use sqlquack_syntax::tokens::models::Dialect; -/// The statements of `sql`, refusing on any parse error or any byte no token covers. +/// The statements of `sql`, refusing on any parse error or uncovered byte; the instruction guard's entry. +#[inline(never)] pub fn parse_strict( sql: &str, dialect: Dialect, diff --git a/crates/sqlquack-syntax-snowflake/src/parser/main/strict_statements.rs b/crates/sqlquack-syntax-snowflake/src/parser/main/strict_statements.rs index 976768c3f..0f2261379 100644 --- a/crates/sqlquack-syntax-snowflake/src/parser/main/strict_statements.rs +++ b/crates/sqlquack-syntax-snowflake/src/parser/main/strict_statements.rs @@ -8,7 +8,8 @@ use sqlquack_syntax::tokens::models::{CallMode, Dialect}; use crate::modes::errors::StrictFailure; use crate::parser::_helpers::support::dialects::dialect_type; -/// The statements of `sql`, with coverage checked over the tokens the parse itself read. +/// The statements of `sql`, coverage checked over the tokens read; inlined so `parse_strict` holds it. +#[inline(always)] pub(crate) fn strict_statements( sql: &str, dialect: Dialect,