-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Currently there is no default implementation of IASTVisitorContext. I suggest providing one with a CancellationToken and one without a CancellationToken (where => default;).
In a similar vein, perhaps we should add an extension method to run a visitor synchronously. Many visitors will not run asynchronously and will not need a cancellation token. .GetAwaiter().GetResult() produces a warning as it will not work correctly if run on a truly asynchronous task, but .ToTask() returns Task.CompletedTask for a completed ValueTask and so perhaps .ToTask().GetAwaiter().GetResult() is an allocation-free and safe method to expose externally.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request