From be0cab224fabbff75ada67383a02fb52ace386a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ademir=20S=C3=A1nchez?= Date: Mon, 13 Mar 2023 20:15:43 -0600 Subject: [PATCH 1/4] feat & meta: added dos + other mathematical expresions, and refactored queues --- package-lock.json | 123 +++++++++++++++++++++++------------ package.json | 2 +- src/runtime/index.ts | 30 +-------- src/runtime/types.d.ts | 1 - src/runtime/visitor/index.ts | 30 +++++---- 5 files changed, 103 insertions(+), 83 deletions(-) diff --git a/package-lock.json b/package-lock.json index 77c3375..23cd1f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "ISC", "dependencies": { - "@aethergames/mkscribe": "^0.3.0", + "@aethergames/mkscribe": "/Users/ademirsanchez/Documents/GitHub/mkscribe/build/aethergames-mkscribe-0.3.0.tgz", "@rbxts/services": "^1.5.1", "@rbxts/testez": "^0.4.2-ts.0" }, @@ -29,18 +29,43 @@ }, "node_modules/@aethergames/mkscribe": { "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@aethergames/mkscribe/-/mkscribe-0.3.0.tgz", - "integrity": "sha512-aL18I6vXOwlKXZI8A/9syFvrRQdjsoweFw089AAtvnTYHOszPYAFUxVqwFVZgLCx4JLs+WcNnU9/aSDgGGsidA==" + "resolved": "file:../mkscribe/build/aethergames-mkscribe-0.3.0.tgz", + "integrity": "sha512-7bLqucEoyRd4LS4ipfWH/03w9MkjizSb1tzh2/2pb7DKfZrqlASbV66e3/etPletYfRq7m9ikzN7wPlQbAZp2A==", + "license": "ISC" + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz", + "integrity": "sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", + "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", - "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", + "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -56,9 +81,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", - "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", + "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -606,13 +631,15 @@ } }, "node_modules/eslint": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", - "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", + "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^2.0.0", - "@eslint/js": "8.35.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -623,9 +650,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", + "espree": "^9.5.0", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -647,7 +673,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -781,9 +806,9 @@ } }, "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", + "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", "dev": true, "dependencies": { "acorn": "^8.8.0", @@ -1774,19 +1799,33 @@ }, "dependencies": { "@aethergames/mkscribe": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@aethergames/mkscribe/-/mkscribe-0.3.0.tgz", - "integrity": "sha512-aL18I6vXOwlKXZI8A/9syFvrRQdjsoweFw089AAtvnTYHOszPYAFUxVqwFVZgLCx4JLs+WcNnU9/aSDgGGsidA==" + "version": "file:/Users/ademirsanchez/Documents/GitHub/mkscribe/build/aethergames-mkscribe-0.3.0.tgz", + "integrity": "sha512-7bLqucEoyRd4LS4ipfWH/03w9MkjizSb1tzh2/2pb7DKfZrqlASbV66e3/etPletYfRq7m9ikzN7wPlQbAZp2A==" + }, + "@eslint-community/eslint-utils": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.2.0.tgz", + "integrity": "sha512-gB8T4H4DEfX2IV9zGDJPOBgP1e/DbfCPDTtEqUMckpvzS1OYtva8JdFYBqMwYk7xAQ429WGF/UPqn8uQ//h2vQ==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", + "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "dev": true }, "@eslint/eslintrc": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz", - "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", + "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.4.0", + "espree": "^9.5.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -1796,9 +1835,9 @@ } }, "@eslint/js": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz", - "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", + "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", "dev": true }, "@humanwhocodes/config-array": { @@ -2163,13 +2202,15 @@ "dev": true }, "eslint": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz", - "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==", + "version": "8.36.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", + "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", "dev": true, "requires": { - "@eslint/eslintrc": "^2.0.0", - "@eslint/js": "8.35.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.1", + "@eslint/js": "8.36.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -2180,9 +2221,8 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", + "espree": "^9.5.0", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2204,7 +2244,6 @@ "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", - "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -2289,9 +2328,9 @@ "dev": true }, "espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", + "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", "dev": true, "requires": { "acorn": "^8.8.0", diff --git a/package.json b/package.json index b6397c8..ef20b91 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "typescript": "^4.9.5" }, "dependencies": { - "@aethergames/mkscribe": "^0.3.0", + "@aethergames/mkscribe": "/Users/ademirsanchez/Documents/GitHub/mkscribe/build/aethergames-mkscribe-0.3.0.tgz", "@rbxts/services": "^1.5.1", "@rbxts/testez": "^0.4.2-ts.0" } diff --git a/src/runtime/index.ts b/src/runtime/index.ts index 5d0563f..bc6a5a4 100644 --- a/src/runtime/index.ts +++ b/src/runtime/index.ts @@ -11,7 +11,6 @@ import { } from "./types"; import { TokenLiteral } from "@aethergames/mkscribe/out/mkscribe/scanner/types"; import { ScribeVisitor, StatusInterpretationCode } from "./visitor"; -import { RunService } from "@rbxts/services"; export class Runtime implements ScribeRuntimeImplementation { public dialogCallback!: (input: DialogCallbackInput) => void; @@ -102,18 +101,13 @@ export class Runtime implements ScribeRuntimeImplementation { public async interact(id: string): Promise { if (this.interactions.has(id) === false) { this.interactions.set(id, { - cleanup: undefined, lastInteraction: 0, queue: new Array(), }); } // eslint-disable-next-line prefer-const - let { cleanup, lastInteraction, queue } = this.interactions.get(id)!; - - if (cleanup !== undefined) { - cleanup.Disconnect(); - } + let { lastInteraction, queue } = this.interactions.get(id)!; const interaction = this.interpreter.records.interactions[id]; if (os.clock() - lastInteraction > this.interactionsCooldown && queue.size() === 0) { @@ -126,8 +120,6 @@ export class Runtime implements ScribeRuntimeImplementation { // eslint-disable-next-line no-constant-condition while (true) { if (os.clock() - lastInteraction > this.interactionsCooldown && queue[1] === interaction) { - this.clean(id); - return this.interpreter.resolve(interaction); } else { task.wait(); @@ -136,23 +128,7 @@ export class Runtime implements ScribeRuntimeImplementation { } } - private clean(id: string): void { - const interactionJob = this.interactions.get(id); - - if (interactionJob !== undefined) { - const { cleanup, lastInteraction, queue } = interactionJob; - - if (cleanup !== undefined) { - interactionJob.cleanup = RunService.PostSimulation.Connect(() => { - if (os.clock() - lastInteraction > this.interactionsCooldown && queue.size() === 0) { - if (this.interactions.has(id)) { - this.interactions.delete(id); - } - - cleanup.Disconnect(); - } - }); - } - } + public getRecords(): ScribeVisitor["records"] { + return this.interpreter.records; } } diff --git a/src/runtime/types.d.ts b/src/runtime/types.d.ts index f6ffaaf..f956173 100644 --- a/src/runtime/types.d.ts +++ b/src/runtime/types.d.ts @@ -3,7 +3,6 @@ import { TokenLiteral } from "@aethergames/mkscribe/out/mkscribe/scanner/types"; import { StatusInterpretationCode } from "./visitor"; export declare type InteractionJob = { - cleanup: RBXScriptConnection | undefined; lastInteraction: number; queue: Array; }; diff --git a/src/runtime/visitor/index.ts b/src/runtime/visitor/index.ts index f968b9b..4ba578e 100644 --- a/src/runtime/visitor/index.ts +++ b/src/runtime/visitor/index.ts @@ -6,7 +6,6 @@ import { StoreStatement, SetStatement, BlockStatement, - BlockOfConditionsStatement, DialogueStatement, ConditionStatement, IfStatement, @@ -28,6 +27,7 @@ import { EchoStatement, InteractStatement, ArrayExpression, + DoStatement, } from "@aethergames/mkscribe/out/mkscribe/ast/types"; import { TokenLiteral } from "@aethergames/mkscribe/out/mkscribe/scanner/types"; import { ScribeEnviroment } from "../../types"; @@ -170,10 +170,6 @@ export class ScribeVisitor implements Interpreter { }; } - /** - * Expressions - */ - public visitBinaryExpression(expr: BinaryExpression): TokenLiteral { let left = this.evaluate(expr.left); let right = this.evaluate(expr.right); @@ -183,6 +179,8 @@ export class ScribeVisitor implements Interpreter { TokenType.PLUS, TokenType.MINUS, TokenType.STAR, + TokenType.EXPONENTIAL, + TokenType.MODULUS, TokenType.SLASH, TokenType.GREATER, TokenType.G_E, @@ -204,6 +202,12 @@ export class ScribeVisitor implements Interpreter { case TokenType.STAR: return left * right; + case TokenType.EXPONENTIAL: + return left ** right; + + case TokenType.MODULUS: + return left % right; + case TokenType.SLASH: return left / right; @@ -327,10 +331,6 @@ export class ScribeVisitor implements Interpreter { return 1; } - /** - * Statements - */ - public visitExpressionStatement(stmt: ExpressionStatement): void { this.evaluate(stmt.expr); } @@ -414,8 +414,8 @@ export class ScribeVisitor implements Interpreter { this.resolveBody(stmt.statements); } - public visitBlockOfConditionsStatement(stmt: BlockOfConditionsStatement): void { - this.resolveBody(stmt.conditions); + public visitDoStatement(stmt: DoStatement): void { + this.resolve(stmt.body); } public visitDialogueStatement(stmt: DialogueStatement): never { @@ -468,7 +468,13 @@ export class ScribeVisitor implements Interpreter { if (this.checkTruthiness(check)) { return this.resolve(stmt.body); - } else return; + } else { + if (stmt.else !== undefined) { + this.resolve(stmt.else); + } + + return; + } } this.resolve(stmt.body); From 1f110b3a1c74018aafce570bda1c348db2da19cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ademir=20S=C3=A1nchez?= Date: Mon, 13 Mar 2023 20:16:19 -0600 Subject: [PATCH 2/4] meta: versioning --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ef20b91..2444472 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@aethergames/scribe", - "version": "0.1.0", + "version": "0.2.1", "description": "Scribe, a scripting language used to describe Dialogues or Quests behavior.", "main": "out/init.lua", "scripts": { From 6d56bb93f3e1c42f0216dbaaec786d5cd2f1f946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ademir=20S=C3=A1nchez?= Date: Mon, 13 Mar 2023 20:21:07 -0600 Subject: [PATCH 3/4] fix: scenes default removed --- package-lock.json | 16 ++++++++-------- package.json | 2 +- src/runtime/visitor/index.ts | 12 +++--------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23cd1f5..53e9bbc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@aethergames/scribe", - "version": "0.1.0", + "version": "0.2.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@aethergames/scribe", - "version": "0.1.0", + "version": "0.2.1", "license": "ISC", "dependencies": { - "@aethergames/mkscribe": "/Users/ademirsanchez/Documents/GitHub/mkscribe/build/aethergames-mkscribe-0.3.0.tgz", + "@aethergames/mkscribe": "file:../mkscribe/build/aethergames-mkscribe-0.3.1.tgz", "@rbxts/services": "^1.5.1", "@rbxts/testez": "^0.4.2-ts.0" }, @@ -28,9 +28,9 @@ } }, "node_modules/@aethergames/mkscribe": { - "version": "0.3.0", - "resolved": "file:../mkscribe/build/aethergames-mkscribe-0.3.0.tgz", - "integrity": "sha512-7bLqucEoyRd4LS4ipfWH/03w9MkjizSb1tzh2/2pb7DKfZrqlASbV66e3/etPletYfRq7m9ikzN7wPlQbAZp2A==", + "version": "0.3.1", + "resolved": "file:../mkscribe/build/aethergames-mkscribe-0.3.1.tgz", + "integrity": "sha512-39IZqJKPYVcokV5f1Le4VXzacATsco63UkVpPDJVR5E8B2LHhHlnWTfSagBj6E3oMZJVvncUL2pTxcHG+mD+dQ==", "license": "ISC" }, "node_modules/@eslint-community/eslint-utils": { @@ -1799,8 +1799,8 @@ }, "dependencies": { "@aethergames/mkscribe": { - "version": "file:/Users/ademirsanchez/Documents/GitHub/mkscribe/build/aethergames-mkscribe-0.3.0.tgz", - "integrity": "sha512-7bLqucEoyRd4LS4ipfWH/03w9MkjizSb1tzh2/2pb7DKfZrqlASbV66e3/etPletYfRq7m9ikzN7wPlQbAZp2A==" + "version": "file:../mkscribe/build/aethergames-mkscribe-0.3.1.tgz", + "integrity": "sha512-39IZqJKPYVcokV5f1Le4VXzacATsco63UkVpPDJVR5E8B2LHhHlnWTfSagBj6E3oMZJVvncUL2pTxcHG+mD+dQ==" }, "@eslint-community/eslint-utils": { "version": "4.2.0", diff --git a/package.json b/package.json index 2444472..cfbaac0 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "typescript": "^4.9.5" }, "dependencies": { - "@aethergames/mkscribe": "/Users/ademirsanchez/Documents/GitHub/mkscribe/build/aethergames-mkscribe-0.3.0.tgz", + "@aethergames/mkscribe": "/Users/ademirsanchez/Documents/GitHub/mkscribe/build/aethergames-mkscribe-0.3.1.tgz", "@rbxts/services": "^1.5.1", "@rbxts/testez": "^0.4.2-ts.0" } diff --git a/src/runtime/visitor/index.ts b/src/runtime/visitor/index.ts index 4ba578e..71cb722 100644 --- a/src/runtime/visitor/index.ts +++ b/src/runtime/visitor/index.ts @@ -481,16 +481,10 @@ export class ScribeVisitor implements Interpreter { } public visitSceneStatement(stmt: SceneStatement): void { - const isDefault = stmt.default; - - if (isDefault) { - this.resolve(stmt.body); - } else { - const ref = stmt.name.lexeme as string; - const refValue = stmt.body; + const ref = stmt.name.lexeme as string; + const refValue = stmt.body; - this.records.scenes[ref] = refValue; - } + this.records.scenes[ref] = refValue; } public visitOptionStatement(stmt: OptionStatement): never { From 704158eae0755a330d4e6d14404a6c39a78ed068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ademir=20S=C3=A1nchez?= Date: Mon, 13 Mar 2023 20:29:35 -0600 Subject: [PATCH 4/4] meta: installation of the correct mkscribe version --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 53e9bbc..dc7f497 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.2.1", "license": "ISC", "dependencies": { - "@aethergames/mkscribe": "file:../mkscribe/build/aethergames-mkscribe-0.3.1.tgz", + "@aethergames/mkscribe": "^0.3.1", "@rbxts/services": "^1.5.1", "@rbxts/testez": "^0.4.2-ts.0" }, @@ -29,9 +29,8 @@ }, "node_modules/@aethergames/mkscribe": { "version": "0.3.1", - "resolved": "file:../mkscribe/build/aethergames-mkscribe-0.3.1.tgz", - "integrity": "sha512-39IZqJKPYVcokV5f1Le4VXzacATsco63UkVpPDJVR5E8B2LHhHlnWTfSagBj6E3oMZJVvncUL2pTxcHG+mD+dQ==", - "license": "ISC" + "resolved": "https://registry.npmjs.org/@aethergames/mkscribe/-/mkscribe-0.3.1.tgz", + "integrity": "sha512-39IZqJKPYVcokV5f1Le4VXzacATsco63UkVpPDJVR5E8B2LHhHlnWTfSagBj6E3oMZJVvncUL2pTxcHG+mD+dQ==" }, "node_modules/@eslint-community/eslint-utils": { "version": "4.2.0", @@ -1799,7 +1798,8 @@ }, "dependencies": { "@aethergames/mkscribe": { - "version": "file:../mkscribe/build/aethergames-mkscribe-0.3.1.tgz", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@aethergames/mkscribe/-/mkscribe-0.3.1.tgz", "integrity": "sha512-39IZqJKPYVcokV5f1Le4VXzacATsco63UkVpPDJVR5E8B2LHhHlnWTfSagBj6E3oMZJVvncUL2pTxcHG+mD+dQ==" }, "@eslint-community/eslint-utils": { diff --git a/package.json b/package.json index cfbaac0..5340ae8 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "typescript": "^4.9.5" }, "dependencies": { - "@aethergames/mkscribe": "/Users/ademirsanchez/Documents/GitHub/mkscribe/build/aethergames-mkscribe-0.3.1.tgz", + "@aethergames/mkscribe": "^0.3.1", "@rbxts/services": "^1.5.1", "@rbxts/testez": "^0.4.2-ts.0" }