porffor 0.48.9 → 0.49.0
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/compiler/codegen.js +1 -7
- package/package.json +1 -1
- package/runner/index.js +1 -1
package/compiler/codegen.js
CHANGED
@@ -4119,8 +4119,6 @@ const generateDoWhile = (scope, decl) => {
|
|
4119
4119
|
};
|
4120
4120
|
|
4121
4121
|
const generateForOf = (scope, decl) => {
|
4122
|
-
if (decl.await) return todo(scope, 'for await is not supported');
|
4123
|
-
|
4124
4122
|
const out = [];
|
4125
4123
|
|
4126
4124
|
let count = 0;
|
@@ -5736,9 +5734,6 @@ const generateMember = (scope, decl, _global, _name) => {
|
|
5736
5734
|
|
5737
5735
|
const generateAwait = (scope, decl) => {
|
5738
5736
|
// hack: implement as ~peeking value `await foo` -> `Porffor.promise.await(foo)`
|
5739
|
-
|
5740
|
-
// todo: warn here if -d?
|
5741
|
-
|
5742
5737
|
return generate(scope, {
|
5743
5738
|
type: 'CallExpression',
|
5744
5739
|
callee: {
|
@@ -5755,7 +5750,6 @@ const generateClass = (scope, decl) => {
|
|
5755
5750
|
const expr = decl.type === 'ClassExpression';
|
5756
5751
|
|
5757
5752
|
const name = decl.id ? decl.id.name : `#anonymous${uniqId()}`;
|
5758
|
-
if (name == null) return todo(scope, 'unknown name for class', expr);
|
5759
5753
|
|
5760
5754
|
const body = decl.body.body;
|
5761
5755
|
const root = {
|
@@ -5963,7 +5957,7 @@ const generateTaggedTemplate = (scope, decl, global = false, name = undefined) =
|
|
5963
5957
|
if (!e.name) {
|
5964
5958
|
if (e.type === 'BinaryExpression' && e.operator === '+' && e.left.type === 'Identifier' && e.right.type === 'Literal') {
|
5965
5959
|
str += lookupName(scope, e.left.name)[0].idx + e.right.value;
|
5966
|
-
}
|
5960
|
+
}
|
5967
5961
|
} else str += lookupName(scope, e.name)[0].idx;
|
5968
5962
|
|
5969
5963
|
str += quasis[i + 1].value.raw;
|
package/package.json
CHANGED