Vexu
6ca0def499
recover from invalid global error set access
2020-05-16 12:09:34 +03:00
Vexu
b2f16d4484
fix infinite loop with mismatced bracket
2020-05-15 23:50:47 +03:00
Vexu
a00fd6e254
properly handle extra closing braces at top level
2020-05-15 14:30:49 +03:00
Vexu
440189a04a
cleanup* remove unecessary error* properly handle ReturnTypeInvalid in ast.zig functions* assert that the tree is clean in render.zig* simplify parser recovery with top level decls
2020-05-15 11:35:37 +03:00
Vexu
c77fee0344
fix infinite loop
...
findToken wasn't as generic as I thought it was
2020-05-14 19:56:55 +03:00
Vexu
a32e240540
improve recovery from invalid container members
...
Instead of trying to find the end of the block or the next comma/semicolon
we no try to find the next token that can start a container member.
2020-05-14 12:09:40 +03:00
Vexu
89f2923a8a
recover from missing semicolon
2020-05-14 11:19:50 +03:00
Vexu
c3b76d0913
recover from invalid builtin/async call
2020-05-14 00:16:56 +03:00
Vexu
1f81887a78
recover after invalid inline/extern
2020-05-13 23:35:58 +03:00
Vexu
ad71d959d7
correctly recover from invalid top level declarations
2020-05-13 23:28:04 +03:00
Vexu
23c5ff94e9
improve recovery on top level declarations
2020-05-13 20:42:18 +03:00
Vexu
cefc04348e
continue parsing on invalid and token
2020-05-13 17:36:06 +03:00
Vexu
be392777b7
continue parsing after missing commas and invalid statements
2020-05-13 17:21:27 +03:00
Vexu
df22c7dfef
std.zig attempt to continue parsing on error
2020-05-12 22:37:39 +03:00
Vexu
fa57463bb9
make parser testError take a list of expected errors
2020-05-12 21:44:08 +03:00
Tadeo Kondrak
84a0a9688c
update docs/tests for async/extern fn removal
2020-05-05 10:31:32 -06:00
Tadeo Kondrak
d0e996405b
add zig fmt fix for async/extern fn
2020-05-05 09:37:59 -06:00
Tadeo Kondrak
7ada59f873
remove nakedcc/stdcallcc/async fn/extern fn fnproto
2020-05-05 09:37:28 -06:00
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