310 Commits

Author SHA1 Message Date
Tadeo Kondrak
8d5636ebe4
Rename noasync to nosuspend in self-hosted, add rewriter 2020-05-05 05:17:33 -06:00
Andrew Kelley
b7914d901c add test coverage for top level fields
closes #2022
2020-05-02 14:53:20 -04:00
Vexu
e72f45475d
Merge pull request #4683 from LakeByTheWoods/parser_test
Add visible newlines to parser_test output when there's a failure.
2020-04-30 12:04:23 +03:00
Vexu
87c9696121
move printWithVisibleNewlines to testing.expectEqualStrings 2020-04-30 10:34:18 +03:00
Vexu
2d06e731ec
rename diffIndex to indexOfDiff 2020-04-30 10:33:50 +03:00
Robin Voetter
32e5248820 Remove old-style @typeOf compatibility 2020-04-20 22:38:29 -04:00
Vexu
b6fe839248
update std lib to decls being disallowed between fields 2020-04-18 23:56:05 +03:00
Vexu
ca3bf6e6ad
translate-c cleanup and zig fmt 2020-04-15 15:15:32 +03:00
Lachlan Easton
daff072af2 Add visible newlines to parser_test output when there's a failure.
Also print first line that differs between expected and result.
2020-04-10 10:38:36 +10:00
daurnimator
e535057364
std: use std.ArrayList(u8).OutStream instead of std.Buffer.OutStream 2020-04-01 10:36:38 -04:00
Michael Raymond
de9933761c std.zig.render: fix newlines before DocComments 2020-03-29 22:41:39 -04:00
Andrew Kelley
13d04f9963
Merge pull request #4741 from momumi/master
allow `_` separators in number literals (stage 1)
2020-03-23 00:54:54 -04:00
momumi
2d18178c27 minor fixes and more tests for _ separators
* Make the tokenizer spit out an Invalid token on the first invalid
  character found in the number literal.
* More parsing and tokenizer tests for number literals
* fix invalid switch statement in ir.zig
2020-03-23 09:21:34 +10:00
LemonBoy
28dbc58837 Address review comments 2020-03-21 09:54:49 +01:00
LemonBoy
128e70ff3a ir: Allow errdefer with payload
Closes #1265
2020-03-21 09:54:49 +01:00
LemonBoy
11a4ce42c1
zig fmt: Respect trailing commas in error set declarations
The logic is not perfect as it doesn't take into account the presence of
doc comments, but it's an improvement over the status quo.
2020-03-18 11:15:22 -04:00
Andrew Kelley
18f1fef142
update standard library to new I/O streams API 2020-03-10 18:44:30 -04:00
Vexu
1ad831a0ef fix zig fmt on noasync block 2020-03-10 15:27:11 -04:00
Vexu
45da72c5b6
remove usages of @typeId, @memberCount, @memberName and @memberType 2020-02-24 23:09:01 +02:00
LemonBoy
95a71e29f8
zig fmt: Fix callconv rewriting for extern + string
Closes #4473
2020-02-18 18:18:15 -05:00
Andrew Kelley
cb3a818699
zig fmt: support noasync await 2020-02-16 01:44:52 -05:00
Benjamin Feng
699c50a375 Switch a bunch of FBA to use testing.allocator 2020-02-12 17:17:56 -06:00
LemonBoy
1658becb62 fmt: Fix one more edge case in container formatting 2020-02-03 16:03:48 -05:00
LemonBoy
e548195fd5 fmt: Use left brace position instead of the right one
Fix a typo and add a test case.
2020-02-01 15:28:23 +01:00
LemonBoy
f34abbf260 fmt: Handle declarations in line with the opening brace 2020-02-01 14:43:31 +01:00
LemonBoy
8309ee8752 fmt: Respect trailing comma for field declarations
Closes #4349
2020-02-01 11:28:21 +01:00
LemonBoy
dee7804a81 fmt: Fix logic to find the argument list closing )
Closes #4341
2020-01-31 18:25:58 -05:00
Benjamin Feng
0c137934cb Move FailingAllocator to testing 2020-01-29 17:38:42 -06:00
Vexu
0ea96c11ef disallow multiline strings in test and library names 2020-01-15 14:20:48 -05:00
Vexu
af2ede4d96 fix crash on multiline library name 2020-01-14 13:10:52 -05:00
xackus
f81529fab1 stage2 parser: fix segfault on extern block 2020-01-10 22:35:41 +01:00
Andrew Kelley
5951b79af4
remove stdcallcc, extern, nakedcc from stage1; zig fmt rewrites 2020-01-06 15:23:05 -05:00
Andrew Kelley
0a9daeb37e
Merge branch 'cc-work' of https://github.com/LemonBoy/zig into LemonBoy-cc-work 2020-01-06 14:07:56 -05:00
LemonBoy
e6485282d3 Better logic for last-param rendering 2020-01-03 11:49:42 +01:00
LemonBoy
7b375a1c4a Revert "Revert "Trailing comma is respected for builtin calls""
This reverts commit f83411b0b1b857c7f8679e3b90d2093ba60621d4.
2020-01-03 10:17:40 +01:00
Andrew Kelley
f83411b0b1
Revert "Trailing comma is respected for builtin calls"
This reverts commit afd029091854358e6e88cfc4cbb524022f4ec136.

This caused test failures.
2020-01-02 21:53:25 -05:00
LemonBoy
afd0290918 Trailing comma is respected for builtin calls 2020-01-02 16:43:39 -05:00
LemonBoy
e99209baf0 Add transform test 2020-01-02 18:57:08 +01:00
LemonBoy
563d9ebfe5 Implement the callconv() annotation 2020-01-02 18:53:16 +01:00
Andrew Kelley
290dc5d95b
zig fmt support for slice sentinel syntax 2019-12-21 14:03:36 -05:00
Robin Voetter
8c096707b7
Additional replacements of @typeOf with @TypeOf 2019-12-10 11:09:41 -05:00
Robin Voetter
23b901d45a
Add typeOf/TypeOf render test 2019-12-10 11:09:29 -05:00
Andrew Kelley
8b2622cdd5
std.fmt.format: tuple parameter instead of var args 2019-12-08 22:53:51 -05:00
Andrew Kelley
64d700bfa6
zig fmt: support comptime fields 2019-12-08 12:26:20 -05:00
Vexu
10cc8cad86
fix zig fmt of c pointers 2019-12-05 14:50:46 +02:00
LemonBoy
26c8930b95 Accept comptime-known expression for asm 2019-12-02 19:53:06 -05:00
Andrew Kelley
8a4c2d3b07
zig fmt fixes for sentinel-terminated pointers
closes #3771
2019-11-25 13:53:06 -05:00
Andrew Kelley
7597735bad
update the stage1 implementation to the new proposal
See #3731
2019-11-23 04:45:35 -05:00
Andrew Kelley
fd6020c4e2
update tests, better error messages, update self-hosted tokenizer 2019-11-21 20:43:41 -05:00
Andrew Kelley
21f344b3b9
add null terminated pointers and arrays to self-hosted
as well as `@typeInfo` and `@Type`
2019-11-21 20:43:41 -05:00