Skip to content

Utilities for extracting syntax properties #715

Closed

Description

@jackfirth

There aren't any APIs for extracting syntax property bundles from syntax objects directly. Here are two proposed APIs that would be useful to have:

(provide
 (contract-out
  [syntax-immediate-properties (-> syntax? syntax-property-bundle?)]
  [syntax-all-properties (-> syntax? syntax-property-bundle?)]))

The former should use syntax-property-symbol-keys and syntax-property to extract each syntax property value that's directly attached to the syntax object. The latter function should combine syntax-immediate-properties with the in-syntax-paths utility mentioned in #714 to build a bundle of all properties in the syntax object and all of its subforms.

Metadata

Metadata

Assignees

Labels

autopilot-candidateThe Copilot Agent should attempt this during a scheduled Autopilot run

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions