Nigel Tao
ed8a91ef51
Add an array.copy_from method.
2017-09-22 16:32:11 +10:00
Nigel Tao
2fb9972bb9
Add a slice.suffix method.
2017-09-22 14:12:54 +10:00
Nigel Tao
51f2b183a2
Add a slice.length method.
2017-09-22 12:37:07 +10:00
Nigel Tao
18e32d61e5
Add a writer1.slice method.
2017-09-22 11:54:24 +10:00
Nigel Tao
0f86add17e
Add a status.is_suspension method.
2017-09-02 09:40:39 +10:00
Nigel Tao
935cd73686
Add a "status" type and "try" keyword.
2017-09-01 16:41:42 +10:00
Nigel Tao
b3710e583f
Add a zlib decoder to std/flate.
2017-08-05 16:34:03 +10:00
Nigel Tao
d2aca16f3c
Add a copy_history32 method.
2017-07-28 11:25:03 +10:00
Nigel Tao
389d9bc8bf
Remove the placeholder code limit count.
2017-07-22 10:14:50 +10:00
Nigel Tao
b78807d60a
Add the "const" keyword.
2017-07-16 12:02:12 +10:00
Nigel Tao
7e9b3aab67
Add a high_bits method.
2017-07-13 13:23:01 +10:00
Nigel Tao
7a41ee4da1
Rename the "status" keyword to "suspension".
2017-07-07 16:54:19 +10:00
Nigel Tao
6a34375cb3
Decode flate stored blocks.
2017-07-07 15:08:40 +10:00
Nigel Tao
17b518376f
Add a packageid keyword.
2017-07-06 11:17:15 +10:00
Nigel Tao
7a3ddbc025
Add a "limit" keyword.
2017-06-22 17:32:56 +10:00
Nigel Tao
1a42706bf1
Add a reader1.skip32 method.
2017-06-22 13:09:53 +10:00
Nigel Tao
07e96d7055
Pack token disambiguation keys a little tighter.
2017-06-22 11:33:24 +10:00
Nigel Tao
17e47fbc1e
Add reader1 and writer1 base types.
2017-06-18 11:50:34 +10:00
Nigel Tao
f4db300358
Support "0x123" hexadecimal numeric literals.
2017-06-16 11:57:02 +10:00
Nigel Tao
f403d0faa8
Generate C code for "in.dst.write?(etc)".
2017-06-10 17:28:35 +10:00
Nigel Tao
3863427127
Add user-defined error and status codes.
2017-06-09 12:26:00 +10:00
Nigel Tao
a81752647c
Generate C code for "x.low_bits(n:y)".
2017-06-08 15:49:52 +10:00
Nigel Tao
0aa6a0f1c2
Don't reserve "ideal" as a keyword.
...
Use "ℤ" instead, which can never conflict with user-defined identifiers,
as it is non-ASCII, but also the mathematical meaning of "ℤ" perfectly
captures the concept of an ideal integer type.
2017-06-08 14:01:52 +10:00
Nigel Tao
cf41f0406b
Add an nptr keyword.
...
This just changes the tokenizer. Changing the parser, checker, code
generator, etc. are future changes.
2017-06-08 13:12:43 +10:00
Nigel Tao
6e7e566232
Rename token.IDMap to token.Map.
2017-06-08 13:10:01 +10:00
Nigel Tao
0646f4472c
Add built-in token.IDs for "read_u8" etc.
2017-06-03 11:15:34 +10:00
Nigel Tao
db41d789a5
Generate C code for "x as T".
2017-06-03 10:24:52 +10:00
Nigel Tao
5a0aea66a3
Bounds check "x >> y".
2017-06-02 10:57:56 +10:00
Nigel Tao
a0a9975815
Add a built-in token.ID for the 0 literal.
2017-06-01 21:33:51 +10:00
Nigel Tao
47da01233b
Use "inv etc" not "assert etc" for invariants.
2017-06-01 11:37:29 +10:00
Nigel Tao
c437bf258e
Parse "pub" and "pri".
2017-05-27 11:02:01 +10:00
Nigel Tao
849f885993
Parse the "!" in "foo!()", meaning impure.
2017-05-27 10:38:19 +10:00
Nigel Tao
7df75101cd
Simplify tokenization of multi-byte squiggles.
2017-05-21 10:56:21 +10:00
Nigel Tao
9184e2682e
Use "T[..inclMax]" instead of "T[:exclMax]".
2017-05-20 15:11:30 +10:00
Nigel Tao
06eaadb1d6
Add via keyword and named args.
2017-05-19 16:14:05 +10:00
Nigel Tao
f713bb9a21
Bounds check "x += y".
2017-05-19 11:34:44 +10:00
Nigel Tao
90c5f4758e
Add Token.KeyFoo constants.
2017-05-18 16:04:26 +10:00
Nigel Tao
a8c304236d
First cut of a bounds checker.
2017-05-18 13:37:46 +10:00
Nigel Tao
1d3ae23418
Introduce "pre" and "post" asserts.
2017-05-14 11:27:46 +10:00
Nigel Tao
85f3cca0cd
Name the func's "in" and "out" params.
...
This eliminates one []*Node typed field from the Node struct.
2017-05-13 16:07:25 +10:00
Nigel Tao
f7095028f0
Check struct declarations.
2017-05-13 15:36:37 +10:00
Nigel Tao
e87ff7163b
Change the "for" keyword to "while".
...
The semantics is closer to C's "while". Also, "while" is simpler, which
means simpler interactions with assertions, pre- and post-conditions.
2017-05-13 14:31:52 +10:00
Nigel Tao
bd5f222fb6
Check "x = 1 + 2".
2017-05-12 18:50:20 +10:00
Nigel Tao
c1ce1b08de
Check "var z u64[:123]".
2017-05-11 17:11:17 +10:00
Nigel Tao
a8a246be7c
Reserve the "ideal" name.
...
Also reject using built-in names as struct or func names.
2017-05-11 15:45:33 +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
56de3228e1
Introduce explicit "var x T" syntax.
...
This makes type checking easier and more explicit.
2017-05-07 09:00:36 +10:00
Nigel Tao
98352c2f07
Add a Checker.Funcs method.
2017-05-06 18:09:37 +10:00
Nigel Tao
cf8167a648
Add ByID and ByToken to token.IDMap.
2017-05-06 17:02:11 +10:00
Nigel Tao
f744089e9c
First cut of a type checker.
2017-05-06 16:55:17 +10:00