-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Support for Nested Module Syntax (#2012)
- Loading branch information
1 parent
3396362
commit 84d76e8
Showing
30 changed files
with
1,018 additions
and
961 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
NestedModule.ice:9: illegal identifier `Holder': `Holder' suffix is reserved | ||
NestedModule.ice:11: illegal identifier `Holder': `Holder' suffix is reserved | ||
NestedModule.ice:15: illegal leading underscore in identifier `__Iceberg' | ||
NestedModule.ice:18: illegal identifier `Holder': `Holder' suffix is reserved | ||
NestedModule.ice:20: illegal identifier `Holder': `Holder' suffix is reserved | ||
NestedModule.ice:24: illegal identifier `APtr': `Ptr' suffix is reserved | ||
NestedModule.ice:24: illegal identifier `BPrx': `Prx' suffix is reserved | ||
NestedModule.ice:24: illegal identifier `CHelper': `Helper' suffix is reserved | ||
NestedModule.ice:27: illegal identifier: module identifiers cannot start with '::' prefix | ||
NestedModule.ice:27: illegal identifier `Helper': `Helper' suffix is reserved |
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,27 @@ | ||
// | ||
// Copyright (c) ZeroC, Inc. All rights reserved. | ||
// | ||
|
||
// Case where the module chain is all good. | ||
module All::Good::Here | ||
{ | ||
module Okay {} | ||
module Holder {} // Error: 'Holder' suffix is reserved | ||
|
||
module Okay::Holder {} // Error: 'Holder' suffix is reserved | ||
} | ||
|
||
// Case where the module chain is broken. | ||
module An::__Iceberg::Ahead // Error: illegal leading underscore | ||
{ | ||
module Okay {} | ||
module Holder {} // Error: 'Holder' suffix is reserved | ||
|
||
module Okay::Holder {} // Error: 'Holder' suffix is reserved | ||
} | ||
|
||
// Ensure that each module segment is individually checked for errors. | ||
module APtr::Okay::BPrx::Fine::CHelper {} | ||
|
||
// Ensure that modules cannot start with a '::' character. | ||
module ::No::Leading::Helper {} |
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
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
Oops, something went wrong.