Skip to content

Allow the definition of external types in artic.#36

Open
m-kurtenacker wants to merge 9 commits intomasterfrom
feature/extern_type
Open

Allow the definition of external types in artic.#36
m-kurtenacker wants to merge 9 commits intomasterfrom
feature/extern_type

Conversation

@m-kurtenacker
Copy link
Contributor

Relates to AnyDSL/thorin#183.

The syntax for these external types is type_ext <NAME> = { <Options> };, with <Options> being a List of string literals. Back-end support is required for these types to work; and the back-end will define how the type is being interpreted.

Syntax (for now): `type_ext <name> =  { <arg>, ... };` where the
arguments are strings that are passed through to the thorin backend.

The implementation of this feature depends on the backend. For now, only
C supports this feature, and only a single argument is supported.
`type_ext bar = { "foo" };` will cause thorin to emit `typedef foo bar;`.
The type (`bar`) is opaque to artic and thorin. This feature is mainly
intended to interact with external APIs, not to extend the artic
programming language as a whole.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants