Skip to main content

normalize_identifiers

Function normalize_identifiers 

Source
pub fn normalize_identifiers(tokens: &[String]) -> Vec<String>
Expand description

Replace identifiers with positional placeholders.

  • Keywords, operators/punctuation, and numeric literals are kept as-is.
  • Identifiers are replaced with _1, _2, etc. (same identifier → same placeholder everywhere).