Skip to content

Validate registered identifiers - #199

Merged
marmeladema merged 1 commit into
masterfrom
validate-identifier-registration
Sep 10, 2026
Merged

Validate registered identifiers#199
marmeladema merged 1 commit into
masterfrom
validate-identifier-registration

Conversation

@marmeladema

@marmeladema marmeladema commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Validate field and function identifiers during scheme registration.

Identifiers must:

  • Start with _ or an ASCII letter.
  • Contain only ASCII letters, digits, underscores, and dots.
  • Have no empty or digit-only segments.
  • Not end with a dot.

This prevents integers and IP addresses such as 123 and 192.0.2.1 from being registered as identifiers while preserving existing fields such as cf.response.1xxx_code.

Registration now returns a structured IdentifierRegistrationError, distinguishing invalid identifiers from redefinitions. Parsing and registration share identifier tokenization, ensuring every accepted registration remains parseable.

Raw byte strings such as a.b.c.d remain ambiguous because they also match identifier syntax. Resolving that ambiguity is outside this PR’s scope.

@marmeladema
marmeladema force-pushed the validate-identifier-registration branch 4 times, most recently from b61c8b0 to d0950d3 Compare September 10, 2026 15:04
@marmeladema
marmeladema merged commit d03183c into master Sep 10, 2026
10 checks passed
@marmeladema
marmeladema deleted the validate-identifier-registration branch September 10, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants