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

Add alias statements #9

Open
TheModMaker opened this issue Oct 8, 2022 · 0 comments
Open

Add alias statements #9

TheModMaker opened this issue Oct 8, 2022 · 0 comments
Labels
enhancement New feature or request language A new language feature

Comments

@TheModMaker
Copy link
Owner

alias statements define a smaller form for a type expression. This allows defining options in a single location. Only explicitly set options are set in the alias, defaults are only resolved when the type is used.

type Example {
  option byte_order = big;
  alias my_int = integer<21, signed>;

  option byte_order = little;
  my_int a;  // signed, little-endian
}
@TheModMaker TheModMaker added enhancement New feature or request language A new language feature labels Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request language A new language feature
Projects
None yet
Development

No branches or pull requests

1 participant