Andrew Kelley
1999f0daad
fix undefined behavior triggered by fn inline test
...
LLVM destroys the string that we use to test if LLVM deleted the
inlined function.
Also fixed forgetting to initialize a buffer in std lib path detection.
2018-04-13 11:10:17 -04:00
Andrew Kelley
0f652b4d80
zig fmt: switch cases on new lines
...
See #911
2018-04-12 21:56:12 -04:00
Andrew Kelley
9e701e951b
zig fmt includes trailing commas
...
See #911
2018-04-12 21:40:15 -04:00
Andrew Kelley
d4572d1140
zig fmt: container init fields each on own line
...
See #911
2018-04-12 21:23:18 -04:00
Andrew Kelley
373b3586a1
inline functions must be stored in const or comptime var
...
closes #913
2018-04-12 16:26:23 -04:00
Jimmi Holst Christensen
0d8646d262
std.zig.parser now parses alignment of functions
...
Related #909
This allows it to parse `std/special/compiler_rt/index.zig`
2018-04-12 08:46:26 +02:00
Andrew Kelley
2b86ffe34a
LLD patch: Do not keep shared symbols to garbage...
...
-collected eliminated DSOs.
This applies https://reviews.llvm.org/D45536 to the embedded
LLD.
Closes #883
2018-04-11 18:15:33 -04:00
Jimmi Holst Christensen
ed1b028276
Merge branch 'master' of github.com:zig-lang/zig
2018-04-11 20:56:22 +02:00
Jimmi Holst Christensen
5b584e06e3
std.zig.parser special cased error in return.
...
Related #909
This allows parsing of `std/special/build_runner.zig`
2018-04-11 20:56:05 +02:00
Andrew Kelley
e48e707c32
allow integer and float literals to be passed to var params
...
closes #623
2018-04-11 14:47:37 -04:00
Jimmi Holst Christensen
a7f77d7c6a
std.zig.parser: requireSemiColon now matches the C++ behavior
...
Related #909
Allowes parsing of `std/os/child_process.zig`
2018-04-11 15:26:00 +02:00
Jimmi Holst Christensen
df4c575525
std.zig.parser now parses inline fn proto
...
Related #909
Allows parsing of `std/os/zen.zig`.
2018-04-11 15:17:51 +02:00
Jimmi Holst Christensen
fe7146277d
std.zig.parser now accept both string and multiline string for strings
...
Related #909
Allows it to parse `std/special/compiler_rt/aullrem.zig`,
`std/special/compiler_rt/aulldiv.zig` and `std/math/x86_64/sqrt.zig`
2018-04-11 14:43:53 +02:00
Jimmi Holst Christensen
28ea364e5e
std.zig.parser now handle `try`'s precedence correctly
...
This allows parsing of `std/zig/parser.zig`. Related: #909
2018-04-11 13:56:39 +02:00
Jimmi Holst Christensen
841ac0f4e1
std.zig.parser now allows assignment expr in switch cases.
...
This makes `std/os/index.zig` parse
related: #909
2018-04-11 13:46:35 +02:00
Jimmi Holst Christensen
4b0556ebd4
std.zig.parser can now parse `std/heap.zig`:
...
related: #909
* Struct fields can now be pub
* Parsing of double deref now works
* Block expressions now have the right precedence
2018-04-11 13:38:06 +02:00
Jimmi Holst Christensen
6fb5ab1b52
std.zig.parser: Redid parsing of error set delc
...
related: #909
2018-04-11 13:05:42 +02:00
Jimmi Holst Christensen
5f3ec023cd
std.zig.parser: Fixed parsing of field access rhs
...
related: #909
2018-04-11 12:53:01 +02:00
Jimmi Holst Christensen
281c17f6ae
std.zig.parser:
...
* Renamed eatToken to expectToken
* A new eatToken fn, which only eats the token, if the id match
* Inlined initNode, as it is not suppose to be used outside createNode
2018-04-11 12:05:10 +02:00
Jimmi Holst Christensen
dae287524d
std.zig: Major refactor
...
* There now exists a few function to allocate all nodes in parser.zig
* ast.zig now have a table of Ids and their corrisponding type
2018-04-11 10:37:04 +02:00
Andrew Kelley
f43711e5fb
Merge branch 'bnoordhuis-fix879'
2018-04-11 00:33:14 -04:00
Andrew Kelley
58c6424d4f
simplify and fix BufMap logic
2018-04-11 00:32:42 -04:00
Andrew Kelley
19e0ed5d3e
Merge branch 'fix879' of https://github.com/bnoordhuis/zig into bnoordhuis-fix879
2018-04-10 23:37:08 -04:00
Andrew Kelley
2ec1cec92d
add more linux syscalls and constants
...
Based on #904 by tgshultz
2018-04-10 23:29:24 -04:00
Andrew Kelley
64d96ad703
Merge pull request #873 from zig-lang/self-hosted-parser
...
Self hosted parser completion
2018-04-10 22:47:18 -04:00
Josh Wolfe
405a2390f0
zig fmt while-else with no blocks
2018-04-10 22:44:55 -04:00
Andrew Kelley
f6c77746d6
add memmove to builtin.o
...
related: #514
2018-04-10 22:24:01 -04:00
Andrew Kelley
27e881c2d7
fix another undefined deref
...
see 0ba85ea6ff
2018-04-10 21:58:04 -04:00
Josh Wolfe
b553b7ab83
Merge branch 'master' into self-hosted-parser
2018-04-10 21:46:13 -04:00
Andrew Kelley
ee3e2790aa
cmake defaults stage1 to install in build directory
2018-04-10 20:57:37 -04:00
Jimmi Holst Christensen
0ba85ea6ff
std.zig.parser fixed segfault when parsing cc for fn decl
2018-04-10 17:46:17 +02:00
Andrew Kelley
477ded9042
add missing call in zig fmt to commit results to disk
2018-04-10 11:00:57 -04:00
Jimmi Holst Christensen
c6aa637146
std.zig.parser: removed dublicate "zig fmt: coroutines" test
2018-04-10 16:33:43 +02:00
Jimmi Holst Christensen
b9cccce26d
std.zig.ast: fixed none compiling code
2018-04-10 15:56:37 +02:00
Jimmi Holst Christensen
db9a9f3a6c
std.zig.parser now parses the `var` type
...
* I parse it as a type in all contexts. This is not how the
C++ compiler does it, but I think typechecking should catch this
2018-04-10 15:16:31 +02:00
Jimmi Holst Christensen
aa09e7b639
std.zig.tokinizer now treats string identifiers as identifiers
2018-04-10 15:01:21 +02:00
Jimmi Holst Christensen
3b80e66507
std.zig.parser now parses toplevel use
2018-04-10 14:52:47 +02:00
Jimmi Holst Christensen
db0812d4b7
std.zig.parser: changed block exprs from primary expr to expr
2018-04-10 14:22:01 +02:00
Jimmi Holst Christensen
706e0d739e
std.zig.parser readded all tests
...
* Ops!
2018-04-10 13:49:52 +02:00
Jimmi Holst Christensen
1b81e406f0
std.zig: fixed compiler errors
2018-04-10 13:43:20 +02:00
Jimmi Holst Christensen
34af38e09b
std.zig.tokinizer: fixed failing tests
2018-04-10 11:35:41 +02:00
Jimmi Holst Christensen
f85b9f2bf3
std.zig.parser now parses coroutine code
2018-04-10 11:25:58 +02:00
Jimmi Holst Christensen
5cd69ee6a4
std.zig.parser changed assign expr to only be allowed in some contexts
...
* Only allowed in while continue expr and statement expr
2018-04-10 09:37:29 +02:00
Jimmi Holst Christensen
2c7996f400
std.zig.parser can now render asm expressions
2018-04-10 09:27:11 +02:00
Andrew Kelley
4545be360a
fix std.io.readline to work on windows
...
closes #882
2018-04-09 21:14:55 -04:00
Jimmi Holst Christensen
a09bb408a2
std.zig.parser now parses asm expressions
...
* We cannot render asm expressions yet
2018-04-09 15:40:16 +02:00
Jimmi Holst Christensen
aa552633cc
std.zig.parser now parses fn types
2018-04-09 14:02:03 +02:00
Jimmi Holst Christensen
7d32c9521f
std.zig.parser now parses comptime
2018-04-09 13:24:47 +02:00
Jimmi Holst Christensen
d04346d2ac
ast.zig.parser now parses defer statements
2018-04-09 13:07:46 +02:00
Jimmi Holst Christensen
c19f5a2356
std.zig.parser now parses if statements
2018-04-09 12:51:18 +02:00