-
Simon Zünd authored
This CL improves SourcePosition support inside the Torque compiler. It starts with the parser, where the SourcePosition of the MatchedInput now encompasses all tokens, not just the first one. Second, AST nodes can now be created with an explicit source position. This can be used to forward the "all encompassing" source position via MatchedInput -> ParseResultIterator to AST nodes. Third, declarables are extended to hold two different SourcePositions: - One represents the whole declarable. For a macro this would inlcude the body as well as the signature. - The other is the SourcePosition of the identifying part of a declarable. In most cases this is the name. For the rest this will stay invalid. R=sigurds@chromium.org, tebbi@chromium.org Bug: v8:7793 Change-Id: I509f83aeef7a040d0ea6363b5b7c31ff1b11f47b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1591600 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#61234}
9b30bdb4