@cella-lang/cpp 0.1.202611050244 → 0.1.202611051127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +27 -0
- package/cpp.arrays.cell +0 -0
- package/cpp.cell +0 -0
- package/cpp.classes.cell +0 -0
- package/cpp.classrules.cell +0 -0
- package/cpp.construction.cell +0 -0
- package/cpp.constructs.cell +0 -0
- package/cpp.copies.cell +0 -0
- package/cpp.exceptions.cell +0 -0
- package/cpp.inheritance.cell +0 -0
- package/cpp.lambdas.cell +0 -0
- package/cpp.layouts.cell +0 -0
- package/cpp.library.algorithms.cell +0 -0
- package/cpp.library.bitsets.cell +0 -0
- package/cpp.library.cell +0 -0
- package/cpp.library.comparisons.cell +0 -0
- package/cpp.library.deques.cell +0 -0
- package/cpp.library.iterators.cell +0 -0
- package/cpp.library.lists.cell +0 -0
- package/cpp.library.maps.cell +0 -0
- package/cpp.library.numerics.cell +0 -0
- package/cpp.library.pairs.cell +0 -0
- package/cpp.library.queues.cell +0 -0
- package/cpp.library.sets.cell +0 -0
- package/cpp.library.stacks.cell +0 -0
- package/cpp.library.strings.cell +0 -0
- package/cpp.library.trees.cell +0 -0
- package/cpp.library.unorderedmaps.cell +0 -0
- package/cpp.library.vectors.cell +0 -0
- package/cpp.memberpointers.cell +0 -0
- package/cpp.names.cell +0 -0
- package/cpp.objects.cell +0 -0
- package/cpp.operators.cell +0 -0
- package/cpp.overloading.cell +0 -0
- package/cpp.polymorphism.cell +0 -0
- package/cpp.primitives.cell +0 -0
- package/cpp.ranges.cell +0 -0
- package/cpp.references.cell +0 -0
- package/cpp.runtimetypes.cell +0 -0
- package/cpp.standardexceptions.cell +0 -0
- package/cpp.standardfunctions.cell +0 -0
- package/cpp.staticmembers.cell +0 -0
- package/cpp.streams.cell +0 -0
- package/cpp.templates.cell +0 -0
- package/cpp.userconversions.cell +0 -0
- package/index.json +520 -492
- package/package.json +6 -6
package/CHANGES.md
CHANGED
|
@@ -5,6 +5,33 @@
|
|
|
5
5
|
|
|
6
6
|
## 未發佈
|
|
7
7
|
|
|
8
|
+
- 執行期的問題帶出問題的值(見 `@cella-lang/cfamily`;**reason 文字不變**):`ubBounds` 的 `index`、`size`(指標算術;容器的下標
|
|
9
|
+
`v[i]` 也帶:vector、deque、string、bitset 的 `operator[]`;空容器的 front/back/pop 不帶)、`ubPastEnd` 的 `index`、`size`、
|
|
10
|
+
`ubOverflow` 的 `type`、`op`、`left`、`right`、`ubDivZero` 的 `op`、`fuel` 的 `steps`。
|
|
11
|
+
- 函式庫的原語 `__cella_out_of_bounds(index, size)`(兩個引數的多載,`lib/cella.hpp`):越界並帶出索引與元素數;`EnvironmentStatement`
|
|
12
|
+
多一個建構子 `indexOutside`、`Primitives.outOfBounds` 是新的(**不相容**:依建構子分派的地方要多一支)。重新生成的模組:
|
|
13
|
+
`cpp.library.vectors`、`deques`、`strings`、`bitsets`。
|
|
14
|
+
|
|
15
|
+
- 空的 vector(沒配置過元素)的 `begin()`、`end()` 之前判 reject(`ubBounds`,`end()` 是空指標加 0),範圍 for 走空的 vector、`v.begin() == v.end()`、
|
|
16
|
+
`sort(v.begin(), v.end())` 都中;現在照 C++17 [expr.add]p4.1、p5.1:空指標加減 0 是空指標、兩個空指標相減是 0,判 accept(輸出和 clang 一致)。
|
|
17
|
+
- **之前判 accept、現在判 reject(`redeclared`)**,clang++ 都是編譯錯誤:同一個區塊宣告兩次同名變數(`int x; int x;`、`int x(1); int x(2);`)、
|
|
18
|
+
for 的 init 或 range for 的變數在本體最外層再宣告(`for (int i = 0; ...) { int i; }`)、catch 的變數在 handler 最外層再宣告、
|
|
19
|
+
參數在函式(含成員函式、建構子、lambda)本體最外層再宣告、switch 的兩個 clause 宣告同名變數(`what: variable`,reason
|
|
20
|
+
`redefinition of 'x'`);同一個命名空間、同名、參數型別相同的兩個自由函式(參數本身的 const、typedef 不算:`void h(int) {}`
|
|
21
|
+
與 `void h(const int) {}` 也是;`what: function`,reason `redefinition of 'h'`;只有回傳型別不同是新的 `what: returnType`,reason
|
|
22
|
+
`functions that differ only in their return type cannot be overloaded`)。多載、內層區塊遮蔽外層、兩個 for 各自的 `i` 照舊 accept。
|
|
23
|
+
- **之前判 reject、現在判 accept**:同一型別的 typedef 再定義一次(`typedef int T; typedef int T;`,經別名也算;區塊裡也是)。
|
|
24
|
+
不同型別仍是 `redeclared`(`what: typedef`),reason 改成 clang 的 `typedef redefinition with different types`(之前 `typedef redefined`),
|
|
25
|
+
區塊裡的 typedef 的 `name` 是寫出來的名字(之前是內部名 `U#u1`)。
|
|
26
|
+
- `Overloading.redefined`、`Overloading.redefinition`、`Overloading.freeFunctions`、`Overloading.parameterKey`、`Overloading.resultKey`:新的;
|
|
27
|
+
`Cpp.prepare` 先檢查自由函式的重複定義。
|
|
28
|
+
|
|
29
|
+
- 編譯錯誤細分成結構化的種類(見 `@cella-lang/cfamily`;判決仍是 reject,**reason 文字不變**):`notAssignable`(含 xvalue 不能被指定、
|
|
30
|
+
隱含刪除的複製指定 `deletedCopy`)、`callArguments`(`no matching function`/`member function`/`constructor` 是 `what: noMatch` 加 `callee`,
|
|
31
|
+
`std::swap` 的引數個數是 tooFew/tooMany)、`redeclared`(`typedef`、`function`)、`returnValue`、`operandTypes`、`noConversion`
|
|
32
|
+
(型別照 C++ 的寫法:`A`、`int &`)。型別查詢的 `errors` 多 `kind`、`params`、`expects`、`got`。
|
|
33
|
+
- `Construction.noDefault` 傳回 `Refusal`(之前是字串)。
|
|
34
|
+
|
|
8
35
|
- 型別查詢:回傳參照的呼叫的節點是去掉參照的型別(隱含轉換之前):`s[0]`、`s.at(0)` 是 `char`,`v[0]`、`v.front()`、`v.back()`、
|
|
9
36
|
`m["k"]`、自訂 class 的 `operator[]`(回傳 `int &`)是 `int`,回傳 `const int &` 的成員函式與 `std::max(x, y)` 是 `const int`;
|
|
10
37
|
之前是模型存參照用的位址的型別(`char *`、`int *`、`const int *`)。參照變數 `r`(`int &r = x`)、當左值的條件 `c ? x : y`、
|
package/cpp.arrays.cell
CHANGED
|
Binary file
|
package/cpp.cell
CHANGED
|
Binary file
|
package/cpp.classes.cell
CHANGED
|
Binary file
|
package/cpp.classrules.cell
CHANGED
|
Binary file
|
package/cpp.construction.cell
CHANGED
|
Binary file
|
package/cpp.constructs.cell
CHANGED
|
Binary file
|
package/cpp.copies.cell
CHANGED
|
Binary file
|
package/cpp.exceptions.cell
CHANGED
|
Binary file
|
package/cpp.inheritance.cell
CHANGED
|
Binary file
|
package/cpp.lambdas.cell
CHANGED
|
Binary file
|
package/cpp.layouts.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.bitsets.cell
CHANGED
|
Binary file
|
package/cpp.library.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.deques.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.lists.cell
CHANGED
|
Binary file
|
package/cpp.library.maps.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.pairs.cell
CHANGED
|
Binary file
|
package/cpp.library.queues.cell
CHANGED
|
Binary file
|
package/cpp.library.sets.cell
CHANGED
|
Binary file
|
package/cpp.library.stacks.cell
CHANGED
|
Binary file
|
package/cpp.library.strings.cell
CHANGED
|
Binary file
|
package/cpp.library.trees.cell
CHANGED
|
Binary file
|
|
Binary file
|
package/cpp.library.vectors.cell
CHANGED
|
Binary file
|
package/cpp.memberpointers.cell
CHANGED
|
Binary file
|
package/cpp.names.cell
CHANGED
|
Binary file
|
package/cpp.objects.cell
CHANGED
|
Binary file
|
package/cpp.operators.cell
CHANGED
|
Binary file
|
package/cpp.overloading.cell
CHANGED
|
Binary file
|
package/cpp.polymorphism.cell
CHANGED
|
Binary file
|
package/cpp.primitives.cell
CHANGED
|
Binary file
|
package/cpp.ranges.cell
CHANGED
|
Binary file
|
package/cpp.references.cell
CHANGED
|
Binary file
|
package/cpp.runtimetypes.cell
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/cpp.staticmembers.cell
CHANGED
|
Binary file
|
package/cpp.streams.cell
CHANGED
|
Binary file
|
package/cpp.templates.cell
CHANGED
|
Binary file
|
package/cpp.userconversions.cell
CHANGED
|
Binary file
|