Commit Graph
12 Commits
Author SHA1 Message Date
Nigel Tao 6e7e566232 Rename token.IDMap to token.Map. 2017-06-08 13:10:01 +10:00
Nigel Tao 90c5f4758e Add Token.KeyFoo constants. 2017-05-18 16:04:26 +10:00
Nigel Tao 1d3ae23418 Introduce "pre" and "post" asserts. 2017-05-14 11:27:46 +10:00
Nigel Tao 54567dbd47 Rename ParseFile, RenderFile to Parse, Render.
Also make various funcs' arg order consist wrt the IDMap and the input
or inputs.
2017-05-11 09:48:01 +10:00
Nigel Tao cf8167a648 Add ByID and ByToken to token.IDMap. 2017-05-06 17:02:11 +10:00
Nigel Tao 65d6608434 Parse "struct foo(x u32)".
Also remove an obsolete TODO comment.
2017-05-05 13:51:09 +10:00
Nigel Tao 94cb8b25cb Tokenize and render comments. 2017-05-05 12:33:38 +10:00
Nigel Tao d192220c3c Don't collapse blank line after { or before }.
The original intent was to eliminate unnecessary blank lines just inside
a func body's { and }, but it also eliminated useful blank lines inside
an if-else chain.
2017-05-05 11:06:26 +10:00
Nigel Tao 5169460c2d Tweak rendering indentation of "x=y+\nz". 2017-05-04 17:38:55 +10:00
Nigel Tao a3fd737dae Tweak rendering tightness of "(", "+" and "-". 2017-05-04 15:43:00 +10:00
Nigel Tao 8a7dee5a4d Parse "f(i)". 2017-05-04 15:12:02 +10:00
Nigel Tao aebbb2b830 First cut of a renderer. 2017-04-30 16:15:16 +10:00