diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-03-23 23:13:01 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-03-23 23:13:01 -0700 |
| commit | a1afe693951f6d2ad06961c06b3a2cc14ad6efd9 (patch) | |
| tree | c26d5a6ee62e7b5bd59d13e0db549a945077aca4 /src/Module.zig | |
| parent | 13ced07f23311bef859d07cdd25e0e4fa95ab76a (diff) | |
| download | zig-a1afe693951f6d2ad06961c06b3a2cc14ad6efd9.tar.gz zig-a1afe693951f6d2ad06961c06b3a2cc14ad6efd9.zip | |
stage2: comment out failing test cases; implement more things
* comment out the failing stage2 test cases
(so that we can uncomment the ones that are newly passing with
further commits)
* Sema: implement negate, negatewrap
* astgen: implement field access, multiline string literals, and
character literals
* Module: when resolving an AST node into a byte offset, use the
main_tokens array, not the firstToken function
Diffstat (limited to 'src/Module.zig')
| -rw-r--r-- | src/Module.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Module.zig b/src/Module.zig index 88595bc80d..fdf8267017 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -1535,7 +1535,8 @@ pub const SrcLoc = struct { const decl = src_loc.container.decl; const node_index = decl.relativeToNodeIndex(node_off); const tree = decl.container.file_scope.base.tree(); - const tok_index = tree.firstToken(node_index); + const main_tokens = tree.nodes.items(.main_token); + const tok_index = main_tokens[node_index]; const token_starts = tree.tokens.items(.start); return token_starts[tok_index]; }, |
