Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spec] Overhaul directive parsing #247

Merged
merged 2 commits into from
Dec 13, 2023
Merged

[Spec] Overhaul directive parsing #247

merged 2 commits into from
Dec 13, 2023

Conversation

bokand
Copy link
Collaborator

@bokand bokand commented Dec 13, 2023

Specify parsing imperatively

  • Add imperative steps to check validity and perform parsing
  • Make parsing happen earlier in the process so that we pass around parsed Text Directive objects rather than strings.
  • Make the steps more precise, referring to infra types and correctly decoding the strings.

Fixes #221
Fixes #230

Fix and make grammar non-normative

  • The grammar is now provided solely as a convenience and is non-normative.
  • Make UnknownDirective not subsumed by TextDirective.

Fixes #220


Preview | Diff

This commit overhauls the parsing steps to avoid using the EBNF grammar
for validity, instead specifying that imperatively. It also moves
parsing to happen earlier in the process so that we pass around parsed
Text Directive objects.

Also makes the steps more precise, referring to infra types and
correctly decoding the strings.

Fixes WICG#221
Fixes WICG#230
The grammar is now provided solely as a convenience so this makes the
section non-normative. Also fixes it so that UnknownDirective doesn't
subsume TextDirective.

Fixes WICG#220
@bokand
Copy link
Collaborator Author

bokand commented Dec 13, 2023

@annevk Similarly in this case, please let me know if you'd like me to change anything but otherwise I'll leave the review until the PR in HTML.

@bokand bokand merged commit d88512f into WICG:main Dec 13, 2023
@bokand bokand deleted the parsingChanges branch December 13, 2023 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant