Commit Graph

22 Commits

Author SHA1 Message Date
Andrew Kelley
53d58684a6 self-hosted: parse var decls 2017-12-10 22:44:04 -05:00
Andrew Kelley
f210f17d30 add self-hosted parsing and rendering to main tests 2017-12-10 21:26:52 -05:00
Andrew Kelley
dc2e3465c7 rendering source code without recursion 2017-12-10 19:40:46 -05:00
Andrew Kelley
62ead3a2ee parsing an extern fn declaration 2017-12-09 20:50:31 -05:00
Andrew Kelley
e9efa74333 partial parameter decl parsing 2017-12-09 20:01:13 -05:00
Andrew Kelley
f466e539ef tokenizing libc hello world 2017-12-08 23:56:07 -05:00
Andrew Kelley
d431b0fb99 parse a simple variable declaration 2017-12-08 23:15:43 -05:00
Andrew Kelley
37fbf01755 awkward void union field syntax no longer needed 2017-12-06 21:41:38 -05:00
Andrew Kelley
18b8a625f5 upgrade to new args api 2017-12-06 18:22:52 -05:00
Andrew Kelley
08d531143f parser skeleton 2017-12-05 00:20:23 -05:00
Andrew Kelley
3976981ab3 tokenizing hello world 2017-12-04 23:40:33 -05:00
Andrew Kelley
7297baa9c6 tokenizing basic operators 2017-12-04 23:29:39 -05:00
Andrew Kelley
07898cc0df tokenizing string literals 2017-12-04 23:25:59 -05:00
Andrew Kelley
798dbe487b simple tokenization 2017-12-04 23:09:03 -05:00
Andrew Kelley
31d9dc3539 read a file 2017-12-04 22:05:27 -05:00
Andrew Kelley
5a25505668 rename "parsec" to "translate-c" 2017-11-24 14:56:05 -05:00
Andrew Kelley
4543413491 std.io: introduce buffered I/O and change API
I started working on #465 and made some corresponding std.io
API changes.

New structs:
 * std.io.FileInStream
 * std.io.FileOutStream
 * std.io.BufferedOutStream
 * std.io.BufferedInStream

Removed:
 * std.io.File.in_stream
 * std.io.File.out_stream

Now instead of &file.out_stream or &file.in_stream to get access to
the stream API for a file, you get it like this:

var file_in_stream = io.FileInStream.init(&file);
const in_stream = &file_in_stream.stream;

var file_out_stream = io.FileOutStream.init(&file);
const out_stream = &file_out_stream.stream;

This is evidence that we might not need any OOP features -
See #130.
2017-11-07 03:22:27 -05:00
Andrew Kelley
634e8713c3 add @memberType and @memberName builtin functions
see #383

there is a plan to unify most of the reflection into 2
builtin functions, as outlined in the above issue,
but this gives us needed features for now, and we can
iterate on the design in future commits
2017-11-06 22:07:19 -05:00
Andrew Kelley
a31b23c46b more compile-time type reflection
See #383
2017-11-03 00:00:57 -04:00
Andrew Kelley
540bac0928 Merge branch 'master' into self-hosted 2017-10-27 01:28:08 -04:00
Andrew Kelley
4f4da3c10c wip self hosted code 2017-10-24 10:08:20 -04:00
Andrew Kelley
92751d5e24 self hosted zig: print usage 2017-10-21 17:31:06 -04:00