smithy-lang / smithy-vscode

A Visual Studio Code extension to provide syntax highlighting for the Smithy IDL.
https://marketplace.visualstudio.com/items?itemName=smithy.smithy-vscode-extension
Apache License 2.0
37 stars 14 forks source link

Support enumValue and default value syntactic sugar #49

Closed srchase closed 2 years ago

srchase commented 2 years ago

This PR updates the TextMate grammar to support the syntactic sugar that can be used to apply enumValue traits in enum and intEnum shapes and custom default values in structure shapes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

srchase commented 2 years ago

CI is failing due to 0.2.0 of the Language server needing to be released to Maven before the integration tests will work again, however the grammar tests succeeded:

> smithy-vscode-extension@0.4.0 test-grammar /home/runner/work/smithy-vscode/smithy-vscode
> npx vscode-tmgrammar-test -s 'source.smithy' -g syntaxes/smithy.tmLanguage.json -t 'tests/grammar/*'

✓ tests/grammar/aggregate-shapes.smithy run successfuly.
✓ tests/grammar/control.smithy run successfuly.
✓ tests/grammar/enums.smithy run successfuly.
✓ tests/grammar/metadata.smithy run successfuly.
✓ tests/grammar/mixins.smithy run successfuly.
✓ tests/grammar/namespace.smithy run successfuly.
✓ tests/grammar/service-shapes.smithy run successfuly.
✓ tests/grammar/simple-shapes.smithy run successfuly.
✓ tests/grammar/target-elision.smithy run successfuly.
✓ tests/grammar/traits.smithy run successfuly.
✓ tests/grammar/use.smithy run successfuly.