0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std/zig
Andrew Kelley 2a990d6966 stage1: rework tokenizer to match stage2
* Extracts AstGen logic from ir.cpp into astgen.cpp. Reduces the
   largest file of stage1 from 33,551 lines to 25,510.
 * tokenizer: rework it completely to match the stage2 tokenizer logic.
   They can now be maintained together; when one is changed, the other
   can be changed in the same way.
   - Each token now takes up 13 bytes instead of 64 bytes. The tokenizer
     does not parse char literals, string literals, integer literals,
     etc into meaningful data. Instead, that happens during parsing or
     astgen.
   - no longer store line offsets. Error messages scan source
     files to find the line/column as needed (same as stage2).
   - main loop: instead of checking the loop, handle a null byte
     explicitly in the switch statements. This is a nice improvement
     that we may want to backport to stage2.
   - delete some dead tokens, artifacts of past syntax that no longer
     exists.
 * Parser: fix a TODO by parsing builtin functions as tokens rather than
   `@` as a separate token. This is how stage2 does it.
 * Remove some debugging infrastructure. These will need to be redone,
   if at all, as the code migrates to match stage2.
   - remove the ast_render code.
   - remove the IR debugging stuff
   - remove teh token printing code
History 2021-05-28 12:58:40 -07:00
..
system Run zig fmt on src/ and lib/std/ 2021-05-20 17:14:18 +02:00
ast.zig zig fmt: replace callconv(.Inline) with the inline keyword 2021-05-20 17:13:47 +02:00
cross_target.zig make "gnu" (mingw-w64) the default C ABI on Windows 2021-05-24 00:13:54 -04:00
fmt.zig std.zig.fmt escaped string formatting recognizes single quote style 2021-02-27 00:27:53 -07:00
parse.zig update comments to match changes to the formal grammar 2021-05-27 21:03:49 -04:00
parser_test.zig stage2: disallow trailing dot on float literals 2021-05-27 21:00:44 -04:00
perf_test.zig std: modernize zig parser perf test 2021-04-06 22:34:48 -07:00
render.zig zig fmt: replace callconv(.Inline) with the inline keyword 2021-05-20 17:13:47 +02:00
string_literal.zig stage1: rework tokenizer to match stage2 2021-05-28 12:58:40 -07:00
system.zig Merge pull request #8667 from sagehane/nixos 2021-05-19 03:28:12 -04:00
tokenizer.zig stage2: disallow trailing dot on float literals 2021-05-27 21:00:44 -04:00