-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These newly disallowed identifiers were never actually supported in practice and are problematic on multiple levels: 1. An identifier like `_` or `__` are bad names that don't help users understand an API. 2. Identifiers like `_` are problematic for languages like Rust that use this character for pattern matching.
- Loading branch information
Showing
10 changed files
with
103 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...st/resources/software/amazon/smithy/model/loader/invalid/invalid-unquoted-shape-id.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// Parse error at line 3, column 19 near `#\n`: Expected a valid identifier character, but found '#' | ||
|
||
metadata abc = __$# | ||
metadata abc = aa$# | ||
|
||
namespace foo.baz |
4 changes: 4 additions & 0 deletions
4
.../src/test/resources/software/amazon/smithy/model/loader/invalid/shape-name-syntax2.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Parse error at line 4, column 11 near `%I`: Expected a valid identifier character, but found '%' | ||
namespace com.foo | ||
|
||
structure %Invalid {} |
4 changes: 4 additions & 0 deletions
4
.../src/test/resources/software/amazon/smithy/model/loader/invalid/shape-name-syntax3.smithy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Parse error at line 4, column 12 near ` `: Expected a valid identifier character, but found ' ' | ||
namespace com.foo | ||
|
||
structure _ {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ $version: "1.0" | |
|
||
namespace smithy.example | ||
|
||
use _$#Bar | ||
use a$#Bar |