Commit Graph
68 Commits
Author SHA1 Message Date
Nigel Tao 3be81643cc hello-wuffs-c: update endwhile syntax
Also fix lang/check
2024-07-09 10:39:24 +10:00
Patrick Georgi f563f32f82 Add SPDX identifier to license headers
SPDX is an ISO standard for describing licenses in a computer readable
format, which is useful when applying license compliance tools and the
like to source code.

In addition to ensuring that the Wuffs C distribution is properly
annotated to the benefit of projects using Wuffs and SPDX-supporting
tools, add it everywhere else where there's a license in this repo for
consistency, too.
2023-10-06 20:52:36 +02:00
Nigel Tao 74a6ea2fcd all: relicense from Apache2 to dual Apache2/MIT
The LICENSE has changed from a single license (Apache2) to a dual
license (Apache2 or MIT, at your option).

If you've previously used Wuffs under the Apache2 license, you are able
to keep doing so. No further action required by you.

The two files listed below (previous releases) are exceptions, as they
are older snapshots, frozen in time. Their license has not changed:
release/c/wuffs-v0.2.c
release/c/wuffs-v0.3.c

Every name in the AUTHORS file, other than Google Inc., has signed
Google's CLA (Contributor License Agreement).
2023-10-06 10:00:59 +11:00
Nigel Tao ea2cd1c5c9 Fix lang/check test for endwhile syntax 2020-02-23 17:11:27 +11:00
Nigel Tao a21ad25bb8 Rename x T to x: T for vars 2019-10-12 21:55:13 +11:00
Nigel Tao 1520a1f345 Rename x T to x: T for fields and func args 2019-10-12 21:49:04 +11:00
Nigel Tao 7872a8893b Rename while:label to while.label 2019-10-12 19:04:32 +11:00
Nigel Tao d501daddc3 Rename [i..j] to [i ..= j], the same as Rust 2019-10-12 18:40:53 +11:00
Nigel Tao ef7aa0d980 Rename "!=" to "<>"; "!" now only shows impurity 2019-03-02 14:51:32 +11:00
Nigel Tao f8a619f47d Update lang/check tests for coroutine_resumed 2019-01-19 12:36:27 +11:00
Nigel Tao 5cddd4894f Fix lang/check tests for language changes 2018-12-27 21:06:50 +11:00
Nigel Tao 6236e7205f Remove packageid 2018-08-12 21:44:49 +10:00
Nigel Tao 77e538aec8 Fix check_test.go for recent changes 2018-07-29 10:32:09 +10:00
Nigel Tao ccb78f5db7 Rename ast.Node methods from Foo to AsFoo 2018-07-01 20:41:21 +10:00
Nigel Tao ba05d5beed Fix check_test.go for recent changes 2018-06-03 11:13:14 +10:00
Nigel Tao 81decad445 Fix lang/check test for the implicit reset method 2018-05-11 10:32:59 +10:00
Nigel Tao 977f1fe64d Remove an &^ AmpHat test 2018-04-26 13:44:18 +10:00
Nigel Tao f95239f6e0 Rename u32, io_reader, etc to base.u32, etc 2018-04-12 21:49:17 +10:00
Nigel Tao d33db6dae0 Introduce "array[N] T" and "slice T" type syntax 2018-04-05 22:21:08 +10:00
Nigel Tao ad277871f5 Fix lang/check tests 2018-01-06 17:03:36 +11:00
Nigel Tao ed03c5943a Add pkg to ast Func, Struct and TypeExpr nodes 2017-12-29 12:08:17 +11:00
Nigel Tao f6159a1c95 Consistently use a and t for ast and token 2017-12-28 11:47:46 +11:00
Nigel Tao bdc47bd6e2 Save the "t" name for the token package 2017-12-28 11:42:09 +11:00
Nigel Tao 1255b162ea Resolve used packages during type checking 2017-12-28 11:24:59 +11:00
Nigel Tao 7fb19d7669 Fix lang/check tests 2017-12-28 11:04:31 +11:00
Nigel Tao d14b56ea39 Type check built-in functions more thoroughly 2017-12-16 13:25:26 +11:00
Nigel Tao 7601fb45ce Rename String(*token.Map) to Str(*token.Map) 2017-12-01 11:22:08 +11:00
Nigel Tao 024dc7f97a Rename PUFFS to WUFFS, part 11 of N 2017-11-30 18:18:40 +11:00
Nigel Tao 79a94558be Rename PUFFS to WUFFS, part 5 of N 2017-11-30 16:37:20 +11:00
Nigel Tao 0cea46531b Rename PUFFS to WUFFS, part 2 of N 2017-11-30 16:23:16 +11:00
Nigel Tao d4372cb5b8 Change license to Apache 2.
Also remove explicit PATENTS file. The new LICENSE file already
discusses patents.

Note that the Puffs project has not yet been publicly released.
2017-10-12 11:17:41 +11:00
Nigel Tao 6904068251 Remove check.FlagsOnlyTypeCheck.
The puffs-gen-foo commands might need to bounds check anyway, to e.g.
generate different code paths depending on whether a u64 typed
expression fits in a usize's range.
2017-06-18 09:17:58 +10:00
Nigel Tao 70d62bc608 Propagate "x == constValue" in bounds checking. 2017-06-10 11:53:50 +10:00
Nigel Tao 793eb043a4 Bounds check intermediate expressions.
When checking "(a + b) * 0", "a + b" might still overflow.
2017-06-10 11:41:20 +10:00
Nigel Tao 6e7e566232 Rename token.IDMap to token.Map. 2017-06-08 13:10:01 +10:00
Nigel Tao 2ed019b670 Add "while:label" and "break:label" syntax. 2017-06-01 13:53:27 +10:00
Nigel Tao 47da01233b Use "inv etc" not "assert etc" for invariants. 2017-06-01 11:37:29 +10:00
Nigel Tao ef55631cbd Simplify bitMask calculation. 2017-05-28 18:51:54 +10:00
Nigel Tao 509e6b48a4 Bounds check "x | y". 2017-05-28 15:28:05 +10:00
Nigel Tao 491985b34f Be consistent wrt m.ByID(id) and id.String(m). 2017-05-28 14:06:24 +10:00
Nigel Tao c437bf258e Parse "pub" and "pri". 2017-05-27 11:02:01 +10:00
Nigel Tao 1d1f3bd46d Build fix for check.Check API change. 2017-05-26 15:42:06 +10:00
Nigel Tao 9184e2682e Use "T[..inclMax]" instead of "T[:exclMax]". 2017-05-20 15:11:30 +10:00
Nigel Tao d3eba13223 Prove "assert true". 2017-05-20 13:30:15 +10:00
Nigel Tao f713bb9a21 Bounds check "x += y". 2017-05-19 11:34:44 +10:00
Nigel Tao 1d3ae23418 Introduce "pre" and "post" asserts. 2017-05-14 11:27:46 +10:00
Nigel Tao dd06f67f7a Check "this.x", "in.y" and "out.z". 2017-05-13 17:40:09 +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 7367a382b2 Check "i < j" when i's type refines j's type. 2017-05-13 10:40:48 +10:00
Nigel Tao 87dcd9ed55 Check the for-loop condition has boolean type. 2017-05-13 10:23:21 +10:00