Skip to main content

keyword_kind_for

Function keyword_kind_for 

Source
pub fn keyword_kind_for(ident: &str, dialect: Dialect) -> Option<SyntaxKind>
Expand description

Like keyword_kind, but a word counts as a keyword only when dialect reserves it.

A Snowflake-only word (e.g. TASK, FLATTEN) returns its keyword kind under Dialect::Snowflake but None under Dialect::Databricks, where it is an ordinary identifier. Shared keywords behave identically in every dialect, so under Dialect::Snowflake this is byte-for-byte equivalent to keyword_kind.