-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ast: add
Location
to wrap parser location
In the future, we will no longer rely on the global singleton to contain the filename and contents, since we want to support multiple files. This change introduces an `ASTSource` class which can be used to contain this metadata, and wraps a reference to this in a new `Location` class. For now, the existing filename and contents are used by the `LogSink`, but this will change very shortly. One related note with this change is the requirement that `Location` be passed to nodes as a r-value. This is a minor change, but means that calls to `make_node` internally must explicitly copy or construct a new location, which makes it clear what is happening. In general, the `Location` type is cheap and can be carried by value. Signed-off-by: Adin Scannell <amscanne@meta.com> stack-info: PR: #3867, branch: user/amscanne/diags/9
- Loading branch information
Showing
27 changed files
with
683 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.