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

Re-visit syntax sugar for enum-like choice declarations? Replace or remove full-stop syntax. #3364

Open
michaellilltokiwa opened this issue Jul 11, 2024 · 1 comment
Labels
enhancement New feature or request Fuzion language related to the language, syntax, etc question A decision or information is required

Comments

@michaellilltokiwa
Copy link
Member

Currently it is possible to declare a choice like:

c : choice a b.

a and b are unit features that are declared automagically.

This works well if the source code is not broken but e.g. in the language server we mostly deal with broken code and want to trigger completion suggestions when user presses dot. Now we would have to figure out if this dot is a full stop or marks a call target.

@michaellilltokiwa michaellilltokiwa added enhancement New feature or request question A decision or information is required Fuzion language related to the language, syntax, etc labels Jul 11, 2024
@fridis fridis changed the title replace full-stop syntax Re-visit syntax sugar for enum-like choice declarations? Replace or remove full-stop syntax. Jul 15, 2024
@fridis
Copy link
Member

fridis commented Jul 22, 2024

I think you meant

c : choice of a, b.

I am not happy about the syntax using a dot here. Maybe just requiring a verbose

a is
b is
c : choice a b is

should do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Fuzion language related to the language, syntax, etc question A decision or information is required
Projects
None yet
Development

No branches or pull requests

2 participants