Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support typed attributes #5

Open
flaxed opened this issue Aug 10, 2019 · 1 comment
Open

Support typed attributes #5

flaxed opened this issue Aug 10, 2019 · 1 comment
Labels
feature Feature suggestion

Comments

@flaxed
Copy link
Contributor

flaxed commented Aug 10, 2019

Support attributes with typed structure, instead of just supporting attributes based on primitive types.

An extension of #4, but because of its possible impact on the project, it should be considered more carefully.

Example (with placeholder syntax):

struct complex_data
{
   foo: { type: bool }
   bar: { type: float32 }
}

attribute complex_attr
{
  type: complex_data
}

struct some_thing
{
  complex_attr: { foo: true, bar: 20 }
}
@flaxed flaxed added the feature Feature suggestion label Aug 10, 2019
@leiradel
Copy link

Another example with C-like syntax:

struct complex_data {
  bool foo;
  f32 bar;
};

struct some_thing {
  complex_data complex_attr = {true, 20};
  complex_data complex_attr = {foo = false, bar = 10};
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature suggestion
Projects
None yet
Development

No branches or pull requests

2 participants