From 4283510f42192b2ffe7608cb98476a38fdb21ed2 Mon Sep 17 00:00:00 2001 From: Jackie Yang Date: Thu, 23 Nov 2023 00:55:08 -0800 Subject: [PATCH] Fix describe on primitive types --- lib/dsl/dsl-interpreter.ts | 5 ++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/dsl/dsl-interpreter.ts b/lib/dsl/dsl-interpreter.ts index d416736..8c787b0 100644 --- a/lib/dsl/dsl-interpreter.ts +++ b/lib/dsl/dsl-interpreter.ts @@ -384,7 +384,10 @@ export class DslInterpreter { value: ast.value, }; } else { - await ast.value.update() + // if ast.value have update function, call it + if (ast.value.update !== undefined) { + await ast.value.update() + } return { type: "object", value: await ast.value.description() }; } } else { diff --git a/package-lock.json b/package-lock.json index 8032ed1..35969ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "reactgenie-dsl", - "version": "0.0.47", + "version": "0.0.49", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "reactgenie-dsl", - "version": "0.0.47", + "version": "0.0.49", "license": "Apache-2.0", "dependencies": { "@babel/cli": "^7.23.0", diff --git a/package.json b/package.json index 4022930..57b7d43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reactgenie-dsl", - "version": "0.0.48", + "version": "0.0.49", "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",