Commit graph

56 commits

Author SHA1 Message Date
pommicket
1f9534d750 cleanup notes 2022-02-13 22:20:49 -05:00
pommicket
2fef698195 first C hello world! 2022-02-13 15:07:26 -05:00
pommicket
239a1a3c27 fixed local variables and also structs containing arrays 2022-02-13 14:24:38 -05:00
pommicket
6b42f4198f compound assignment operators 2022-02-13 10:06:41 -05:00
pommicket
864b23702a codegen for address of 2022-02-12 14:12:01 -05:00
pommicket
0ee06ac2c4 codegen for dereference, subscript 2022-02-12 13:53:35 -05:00
pommicket
0a14c8ca2a local variables 2022-02-12 12:03:00 -05:00
pommicket
b13e16b517 fixed prefix -- parsing; codegen for unary + - ~ ! 2022-02-11 13:52:56 -05:00
pommicket
d8bb5b8957 first working executable! 2022-02-10 16:06:17 -05:00
pommicket
b88de92fc7 fix some calling convention stuff 2022-02-10 13:24:02 -05:00
pommicket
3d44eba388 start codegen 2022-02-09 22:44:27 -05:00
pommicket
d74dc53b0b more parsing tests, fixed more bugs
- we now handle incomplete structs properly
- small fix in for loop printing
2022-02-09 15:50:02 -05:00
pommicket
aba654c36d fix a bunch of problems from parsing test
- ll suffixes (15ll => 15l)
- newlines between string literals to be concatenated
- fix *x++ = 1;
- default
- printing conditionals & decaying conditional operands
2022-02-07 17:02:57 -05:00
pommicket
ef1100ad08 defined in #if (forgot about that earlier) 2022-02-07 15:53:44 -05:00
pommicket
9372a72d43 proper call typing? 2022-02-07 14:52:50 -05:00
pommicket
c2377fa40f parsing calls, mostly 2022-02-07 12:18:41 -05:00
pommicket
bbd9eb17e0 using function names 2022-02-06 20:00:30 -05:00
pommicket
b404c21bfc function parameters, fix local variables 2022-02-06 18:24:52 -05:00
pommicket
2186650d77 while 2022-02-06 13:42:43 -05:00
pommicket
a61c4f88f9 local variables in expressions 2022-02-05 19:41:45 -05:00
pommicket
ebe96b9e85 start local declarations 2022-02-05 18:41:01 -05:00
pommicket
267b52814e bugfix, planning static variables 2022-02-04 23:21:33 -05:00
pommicket
d75b4154d3 parse goto, case 2022-02-04 22:36:22 -05:00
pommicket
dfce9118b9 parsing break, continue, return 2022-02-04 19:31:45 -05:00
pommicket
d1167f03d0 start parsing statements (not a lot yet) 2022-02-03 22:53:38 -05:00
pommicket
fd02968c23 dereferencing function pointers 2022-02-03 21:46:36 -05:00
pommicket
04c5e1af8a fixed cast parsing bug
i hope casts weren't at a different precedence level for a reason
2022-02-02 23:05:33 -05:00
pommicket
f4a8333751 various simplifications, start array initializers 2022-02-02 11:57:11 -05:00
pommicket
92293e83ac string literal initializers, global variable expressions 2022-02-02 09:49:56 -05:00
pommicket
217794afce start top level decls - also oops forgot about sizeless arrays 2022-01-28 15:07:23 -05:00
pommicket
01b8a4d728 switch to using mmap for output file 2022-01-27 18:52:39 -05:00
pommicket
09f3f9b450 fix problem with casts immediately followed by operators 2022-01-27 18:00:31 -05:00
pommicket
539f23eaec structs mostly working 2022-01-27 10:57:18 -05:00
pommicket
fb564812c2 i forgot about commas ... 2022-01-25 18:28:26 -05:00
pommicket
049bd1440d enums almost working 2022-01-24 20:53:37 -05:00
pommicket
150fbb9dd8 casts 2022-01-24 18:27:09 -05:00
pommicket
08c49a193f more consterxprs 2022-01-21 23:24:18 -05:00
pommicket
7ae8a22a94 very simple types working! 2022-01-19 22:23:29 -05:00
pommicket
e3547b76b1 some binop typing 2022-01-14 13:41:44 -05:00
pommicket
39b5101490 unary ops mostly working 2022-01-14 10:08:02 -05:00
pommicket
05cbc58299 binop parsing working 2022-01-13 23:20:45 -05:00
pommicket
53ddd5803e more binop stuff 2022-01-13 20:29:52 -05:00
pommicket
e44bc4976a start parsing binary ops 2022-01-13 18:13:29 -05:00
pommicket
13363eac1a simple expressions 2022-01-13 16:12:28 -05:00
pommicket
f8f044a7a2 tokenizing string literals and identifiers 2022-01-11 15:55:37 -05:00
pommicket
b0837b367e tokenizing integer literals 2022-01-11 14:03:47 -05:00
pommicket
fc96e22d4f better keyword tokenization system 2022-01-11 11:53:36 -05:00
pommicket
97dca844c8 start tokenization 2022-01-11 00:09:11 -05:00
pommicket
34dfc3238d ifdef/ifndef/else/endif 2022-01-10 18:04:53 -05:00
pommicket
a8a30458bd pre-defined macros 2022-01-10 12:00:05 -05:00