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 Enum functionality #484

Merged
merged 71 commits into from
Feb 11, 2022
Merged

Add Enum functionality #484

merged 71 commits into from
Feb 11, 2022

Conversation

TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Jan 14, 2022

Resolves #299

  • adds support for enum statements. This is still a work-in-progress.

  • enum validations are performed in the BscPlugin in the onFileValidate event.

  • lexer support

  • parser support

  • validations

  • transpile

    • calculate the default values for uninitialized enum members

@TwitchBronBron TwitchBronBron changed the title Basic Enum support Add Enum functionality Jan 25, 2022
TwitchBronBron and others added 11 commits January 25, 2022 10:43
* adds completions for enum types

* add tests to prove there are no enum member collisions

* Formatting fixes

* small var naming tweaks

* remove unnecessary eslint disable.

* clean up test a little

* adds validation for enums

* adds completions for enum types

* add tests to prove there are no enum member collisions

* Formatting fixes

* small var naming tweaks

* remove unnecessary eslint disable.

* clean up test a little

* changes namespace.enumStatements to map

* changes namespace.enumStatements to map

* fixes broken imports

* uses visitor to ascertain dotted get statements

* fix circular ref issues.

* clean up some tests

Co-authored-by: Bronley Plumb <bronley@gmail.com>
* adds completions for enum types

* add tests to prove there are no enum member collisions

* Formatting fixes

* small var naming tweaks

* remove unnecessary eslint disable.

* clean up test a little

* adds validation for enums

* adds completions for enum types

* add tests to prove there are no enum member collisions

* Formatting fixes

* small var naming tweaks

* remove unnecessary eslint disable.

* clean up test a little

* changes namespace.enumStatements to map

* changes namespace.enumStatements to map

* fixes broken imports

* uses visitor to ascertain dotted get statements

* fix circular ref issues.

* Expression tracking during parse.

* Partial support for re-calculating `references.expressions`

* Capture rest of missing expressions.

* Fix lint issues.

* integrate with `parser.references.expressions`

* Remove unnecessary eslint disable comment

* Clean up enum tests

* clean up some tests

Co-authored-by: Bronley Plumb <bronley@gmail.com>
@TwitchBronBron TwitchBronBron marked this pull request as ready for review February 11, 2022 20:09
@TwitchBronBron TwitchBronBron merged commit 3a03b01 into master Feb 11, 2022
@TwitchBronBron TwitchBronBron deleted the feat/enum branch February 11, 2022 20:14
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.

Add Enums
2 participants