0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test
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
..
behavior stage1: rework tokenizer to match stage2 2021-05-28 12:58:40 -07:00
src tests: Use {s} instead of {} when formatting strings 2021-01-02 17:12:57 -07:00
stage1/c_abi stage1: Widen non byte-sized atomic loads/stores 2021-05-14 15:16:24 -04:00
stage2 stage2: astgen error for return or try in defer block 2021-05-22 20:54:14 -04:00
standalone add a standalone for zig as a c/c++ compiler 2021-05-25 00:42:31 +02:00
assemble_and_link.zig update std lib to new Target API 2020-02-28 14:51:54 -05:00
behavior.zig move behavior tests from test/stage1/ to test/ 2021-04-29 15:54:04 -07:00
cli.zig std: @import("builtin").StackTrace -> std.builtin.StackTrace 2021-05-17 14:36:51 -07:00
compare_output.zig Reduce use of deprecated IO types 2021-01-07 23:48:58 -08:00
compile_errors.zig update langref, compile-error tests, safety tests 2021-05-17 15:25:27 -07:00
gen_h.zig run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
run_translated_c.zig translate-c: add support for __cleanup__ attribute 2021-05-19 12:12:18 +03:00
runtime_safety.zig update langref, compile-error tests, safety tests 2021-05-17 15:25:27 -07:00
stack_traces.zig overhaul elf csu (c-runtime startup) logic 2021-05-23 15:38:57 -04:00
standalone.zig add a standalone for zig as a c/c++ compiler 2021-05-25 00:42:31 +02:00
tests.zig standalone tests may now test cross targets and build modes. 2021-05-25 00:19:23 +02:00
translate_c.zig translate-c: Translate FnDecl's that appear within functions 2021-05-23 15:42:36 +03:00