Skip to content

Commit 34f49cd

Browse files
committed
upd
1 parent c60d71d commit 34f49cd

8 files changed

Lines changed: 13 additions & 57 deletions

File tree

TODO

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@
180180
- [ ] Indexing
181181
- [ ] `shareable:Boolean`
182182
- [ ] `clone()`
183-
- [ ] sx.intl.**
183+
- [ ] sx.intl.*
184184
- [ ] Like ECMA-262 `Intl`. Aliased globally as `Intl::` for clarity.
185-
- [ ] sx.temporal.**
185+
- [ ] Do not define subpackages for consistency with `Intl::`.
186+
- [ ] sx.temporal.*
186187
- [ ] Defines ECMA-262 like `Temporal` functionality, including classes and methods. That package is aliased globally as `Temporal::` for clarity.
187-
188+
- [ ] Do not define subpackages for consistency with `Temporal::`.

src/_BASE/statements/import.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,5 @@ Alias a package:
2323
```
2424
import f = q.f.*;
2525
26-
f::x
27-
```
28-
29-
Alias a package recursively:
30-
31-
```
32-
package q.f.w {
33-
public var x = 10;
34-
}
35-
36-
import f = q.f.**;
3726
f::x
3827
```

src/aliases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Aliases are used in different places of the language:
44

55
```
66
import CT = com.business.coreRT.enum.ContactType;
7-
import q = com.business.quantum.**;
7+
import q = com.business.quantum.*;
88
type U = (decimal, String);
99
namespace special_version;
1010
```

src/default-lexical-scope.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ The topmost scope defines a `SX` property, which is an alias to a package wildca
1212

1313
## Intl
1414

15-
The topmost scope defines a `Intl` property, which is an alias to `sx.intl.**`.
15+
The topmost scope defines a `Intl` property, which is an alias to `sx.intl.*`.
1616

1717
## Temporal
1818

19-
The topmost scope defines a `Temporal` property, which is an alias to `sx.temporal.**`.
19+
The topmost scope defines a `Temporal` property, which is an alias to `sx.temporal.*`.

src/lexical-scopes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
### Import list
1313

14-
The import list may contain package single imports, package wildcard imports, and package recursive imports.
14+
The import list may contain package single imports and package wildcard imports.
1515

1616
## Scope variants
1717

src/overview/relation/java.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Package flexibility
44

5-
ShockScript has an advantage over Java when it comes to packages: the user can import a package recursively and even alias it.
5+
While importing definitions, the user can alias a definition, or even a package.
66

77
```
88
package com.business.product.core {
@@ -11,31 +11,17 @@ package com.business.product.core {
1111
//
1212
}
1313
}
14-
package com.business.product.core.enum {
14+
package com.business.product.core {
1515
//
1616
public enum ChartType {
1717
const BAR;
1818
const FLOW;
1919
}
2020
}
2121
22-
import pns = com.business.product.**;
22+
import pns = com.business.product.*;
2323
//
2424
const chart_type : pns::ChartType = "flow";
2525
//
2626
const chart = new pns::Chart(chart_type);
27-
```
28-
29-
When doing so, the user must ensure that a name is not to collide with another name.
30-
31-
```
32-
package com.company.product {
33-
public const x = 0;
34-
}
35-
package com.company.product.omega {
36-
public const x = 10, y = 10.5;
37-
}
38-
import pns = com.company.product.**;
39-
pns::y // OK
40-
pns::x // ERROR! name conflict
4127
```

src/overview/relation/reactjs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ShockScript allows for `<q:N>`, whose name resolution equals `q::N`. Dots may be
2525
For brevity, you do either:
2626

2727
```
28-
import bc = com.business.components.**;
28+
import bc = com.business.components.*;
2929
3030
<bc:AppBar/>
3131
```

src/packages.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ A package wildcard import is aliased for the following directive:
6969
import q = com.business.quantum.*;
7070
```
7171

72-
Then `q` may be used as a qualifier to resolve to a name in the `quantum` package (excluding subpackages).
72+
Then `q` may be used as a qualifier to resolve to a name in the `com.business.quantum.*` package (excluding subpackages).
7373

7474
```
7575
q::x
@@ -81,26 +81,6 @@ For the following directive, the package wildcard import is contributed to the l
8181
import com.business.quantum.*;
8282
```
8383

84-
## Package recursive import
85-
86-
A package recursive import is aliased for the following directive:
87-
88-
```
89-
import q = com.business.quantum.**;
90-
```
91-
92-
Then `q` may be used as a qualifier to resolve to a name in the `quantum` package and its subpackages in a recursive way.
93-
94-
```
95-
q::x
96-
```
97-
98-
For the following directive, the package recursive import is contributed to the lexical scope:
99-
100-
```
101-
import com.business.quantum.**;
102-
```
103-
10484
## Source path
10585

10686
- A package definition must contain exactly one definition item, and its name must match the source path.

0 commit comments

Comments
 (0)