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

Add public method find_unlinked_contexts to SyntaxSet #332

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

keith-hall
Copy link
Collaborator

To help ensure at asset/syntax set building time that all contexts which are push/set targets are resolvable, and no run-time errors should occur while parsing due to unlinked context references. Relates to: sharkdp/bat#915 (comment)

I wasn't sure the best way to present the results, so I'm just doing a debug formatting on any ContextReference which can't be found for now. Also, it may be useful in future to add some details about which context (i.e. the name given to the context) the match pattern with an invalid context reference was found in.

@trishume
Copy link
Owner

Thanks, this feature makes sense and the implementation seems fine

@trishume trishume merged commit ba23a2b into master Apr 21, 2021
@keith-hall keith-hall deleted the find_unlinked_contexts branch April 22, 2021 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants