Skip to content

Commit b8bdaa9

Browse files
committed
upd
1 parent c451eef commit b8bdaa9

6 files changed

Lines changed: 19 additions & 15 deletions

File tree

TODO

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@
162162
- [ ] NaN
163163
- [ ] undefined
164164
- [ ] Number = union `(byte, short, int, uint, long, bigint, float, double, decimal)`
165+
- [ ] boolean alias = Boolean
166+
- [ ] string alias = String
165167
- [ ] DecimalContext
166168
- [ ] Supports "precision" and "rounding" options for now (look at decimal.js's API to get some ideas)
167169
- [ ] Iterator.\<T> (interface)
@@ -228,6 +230,7 @@
228230
- [ ] toString()
229231
- [ ] toLocaleString()
230232
- [ ] valueOf()
233+
- [ ] Boolean class
231234
- [ ] Array
232235
- [ ] +Iterable
233236
- [ ] length : int (not uint)
@@ -259,7 +262,7 @@
259262
- [ ] Math
260263
- [ ] `random()`
261264
- [ ] `random(start, end)` (inclusive; most Number types supported)
262-
- [ ] string
265+
- [ ] String class
263266
- [ ] +Iterable
264267
- [ ] static `fromByte(...):string`
265268
- [ ] length (in UTF-8 bytes; int, not uint)

src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
- [Wildcard type](./types/wildcard.md)
3030
- [void type](./types/void.md)
3131
- [null type](./types/null.md)
32-
- [string type](./types/string.md)
33-
- [boolean type](./types/boolean.md)
32+
- [String type](./types/string.md)
33+
- [Boolean type](./types/boolean.md)
3434
- [Number type](./types/number.md)
3535
- [float type](./types/float.md)
3636
- [double type](./types/double.md)

src/overview/language-comparison/as3.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ ShockScript looks like ActionScript 3. This section describes several details th
55
## Primitive types
66

77
- ShockScript does have more numeric types close to ECMAScript 4.
8-
- Primitive types are in a lowercase form, adapting more from the ECMAScript 4 proposal, but without backwards compatibility.
8+
- The Boolean and String type names are as they are, although they are alternatively aliased `boolean` and `string` in the top-level package.
99

10-
## string type
10+
## String type
1111

12-
The `string` type stores an UTF-8 encoded text, not an UTF-16 encoded text.
12+
The String type stores an UTF-8 encoded text, not an UTF-16 encoded text.
1313

1414
```sx
15-
"\u{10ffff}".length // utf-8 length
16-
"\u{10ffff}".charAt(0) // code point at byte 0
15+
"\u{10ffff}".length // UTF-8 length
16+
"\u{10ffff}".charAt(0) // Code Point at byte 0
17+
"\u{10ffff}".charCodeAt(0)
1718
1819
1920
for each (var ch in "shockscript".chars()) {
@@ -26,7 +27,7 @@ for each (var ch in "shockscript".chars()) {
2627

2728
## Include directive
2829

29-
The `include` directive is not included in ShockScript.
30+
The `include` directive is not included in ShockScript. It was attempted before, even though it imposes certain efforts for language servers. That may be reconsidered in the future.
3031

3132
## Dynamic
3233

@@ -68,7 +69,7 @@ trace(k in m);
6869
The filter operator has been modified to use a `*` identifier rather than cluttering the lexical scope with dynamic names.
6970

7071
```sx
71-
xnode.(*.@x.startsWith("abc"))
72+
xn.(*.@x.startsWith("abc"))
7273
```
7374

7475
## With statement

src/types/array.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ The `Array.<T>` type, abbreviated `[T]`, represents a growable list of elements.
44

55
## Numeric optimization
66

7-
`[t]` is optimized for when `t` is a number or boolean type; for instance, `[uint]` uses a growable buffer optimized specifically for 32-bit integers.
7+
`[t]` is optimized for when `t` is a Number or Boolean type; for instance, `[uint]` uses a growable buffer optimized specifically for 32-bit integers.

src/types/boolean.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# boolean type
1+
# Boolean type
22

3-
The `boolean` type consists of the values `false` and `true`.
3+
The Boolean type (or its alias `boolean`) consists of the values `false` and `true`.

src/types/string.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# string type
1+
# String type
22

3-
The `string` type represents an UTF-8 encoded character sequence.
3+
The String type (or its alias `string`) represents an UTF-8 encoded character sequence.
44

55
> **Note**: the `.length` property of a `string` equals the byte total, and the `.chars().length()` method of a `string` equals the Unicode code point total.

0 commit comments

Comments
 (0)