-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Python-like import syntax (#598)
### Summary of Changes Replace the old Java-like import syntax with a Python-like import syntax: Old: ```java import myPackage.MyDeclaration import myPackage.MyDeclaration2 as AnotherDeclaration import myPackage2.* ``` New: ```py from myPackage import MyDeclaration, MyDeclaration2 as AnotherDeclaration from myPackage2 import * ``` The new syntax has several advantages: 1. It clearly separates the package name and the declaration name. 2. When importing multiple declarations from the same package, the package name need not be repeated. 3. In a qualified import, the imported declarations are now cross-references instead of plain text. Because of this, they get updated, when the imported declaration is renamed. Xtext had special handling of the Java-style imports, but Langium does not, so it makes not difference for the implementation of the language. --------- Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
- Loading branch information
1 parent
121f149
commit 4c61b8c
Showing
149 changed files
with
1,556 additions
and
837 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
Oops, something went wrong.