All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix the
DOWNLOAD_EXTRACT_TIMESTAMP
CMake warning (issue #15).
- Generation of binding variables when compiling on C++ (issue #14).
- Initialise
.data.dummy
to'\0'
for empty variants. Previously, it was uninitialised.
- Specify
C
as the project language inCMakeLists.txt
. Previously, CMake detected C++ and required a C++ compiler to compile the project. - Require CMake v3.11.4.
- Add the root
CMakeLists.txt
to be able to use CMake withFetchContent
oradd_subdirectory
.
- The
derive
attribute was made into a macro (see issue #12).
- Previously, shortcuts referring to functional macros were object-like. To avoid nasty compilation errors, now they are function-like too:
datatype(...)
record(...)
match(val)
MATCHES(val, tag)
matches(val, tag)
ifLet(val, tag, ...)
of(...)
DATATYPE99_VERSION_COMPATIBLE
to check for a SemVer-compatible version.DATATYPE99_VERSION_EQ
to check for an exact version.
MATCHES
/MATCHES99
to know where is a macro and where is a function.
matches
/matches99
; useMATCHES
/MATCHES99
instead.
- An empty record --
record(Foo)
.
record
,DATATYPE99_record
,DATATYPE99_RECORD_DERIVE_
to generate a record type.- The
dummy
deriver for record types.
- Add the missing arity specifier for
DATATYPE99_datatype
. - Make Datatype99 work on TCC (see issue #10).
- A mechanism for deriving:
datatype
now can be specified withderive(...)
. - Manipulation of attributes:
DATATYPE99_attrIsPresent
/DATATYPE99_ATTR_IS_PRESENT
to check the presence of an attribute.DATATYPE99_attrValue
/DATATYPE99_ATTR_VALUE
to extract an attribute's value.DATATYPE99_assertAttrIsPresent
to assert a mandatory attribute.
- A deriver
dummy
which generates nothing. - Metalang99-compliant counterparts:
DATATYPE99_of
,DATATYPE99_ifLet
.
- Do not suppress
-Wmisleading-indentation
(GCC) automatically inmatch
.
#pragma GCC diagnostic
inside functions error on GCC older than 4.6 (issue #8).- Inconsistent suppression of
-Wreturn-type
(issue #9). - Suppress Clang's
-Wcast-qual
inifLet
.
DATATYPE99_MAJOR
,DATATYPE99_MINOR
,DATATYPE99_PATCH
.
Unit
=>UnitT
,unit
=>unit_v
(less likely to conflict with user-defined identifiers).
- Suppress Clang's
-Wcast-qual
inmatch
.
ifLet
to match only a single variant.
<datatype-name>Data
=><datatype-name>Variants
(less likely to conflict with user-defined types).
- Avoid using
METALANG99_semicolon
because it turned out to be dangerous. - Clang's
-Wused-but-marked-unused
inof
. - The specification now requires an lvalue for
match
.
- Generate
<datatype-name>Tag
and<datatype-name>Data
.
- Suppress
-Wmisleading-indentation
only when__GNUC__ >= 6
. - Suppress
-Wreturn-type
for Clang too. - Make it work on C++11.
- Force users to download Metalang99 as well, i.e. don't use it as a Git submodule.
- Annotate value constructors with
__attribute__((warn_unused_result))
and__attribute__((const))
if supported.
- Generate
typedef struct <datatype-name> <datatype-name>;
beforehand so<datatype-name> *
can be used instead ofstruct <datatype-name> *
inside variants. - The reserved
_
identifier forof
. - Error reporting about an unparenthesised variant like
Bar(int)
. Unit
andunit
.
- Replace
Epilepsy
withMetalang99
(more neutral).
- This excellent project.