Skip to content

Commit

Permalink
ignore failed cases in array actions
Browse files Browse the repository at this point in the history
  • Loading branch information
valkjsaaa committed May 15, 2024
1 parent 00bb0f0 commit 689b7a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions lib/dsl/dsl-interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,14 @@ export class DslInterpreter {
if (parent.type == "array") {
const arrayValue = [];
for (const v of parent.value) {
arrayValue.push(await this.resolveAccess({
...ast,
parent: v
}, env));
try {
arrayValue.push(await this.resolveAccess({
...ast,
parent: v
}, env));
} catch (e) {
console.log(e);
}
}
let objType = null
if (arrayValue.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactgenie-dsl",
"version": "0.0.57",
"version": "0.0.58",
"description": "A natural language parser based on a large language model",
"scripts": {
"prepare": "peggy lib/dsl/parser.pegjs -o lib/dsl/parser.gen.js && tsc",
Expand Down

0 comments on commit 689b7a5

Please sign in to comment.