From e4273daa403fb4d8ae2eb74d799e68931b9c4c1a Mon Sep 17 00:00:00 2001 From: Marcus Date: Mon, 17 May 2021 18:37:55 -0400 Subject: [PATCH] Added functions to this context. Closes #15 --- Instance.js | 10 +- test/console.v | 58 +++++++ test/interface.v | 41 ----- test/main.v | 10 +- test/package.json | 3 + test/yarn.lock | 425 +++++++++++++++++++++++++++++++--------------- test2/uhhh.v | 9 + 7 files changed, 369 insertions(+), 187 deletions(-) create mode 100644 test/console.v delete mode 100644 test/interface.v create mode 100644 test2/uhhh.v diff --git a/Instance.js b/Instance.js index 1eab447..f6fc866 100644 --- a/Instance.js +++ b/Instance.js @@ -12,6 +12,7 @@ export default class Instance extends Serializable { system = null; context = null; locals = []; + internalFunctions = {}; // reconstruct context when we need it... createContext() { @@ -25,7 +26,8 @@ export default class Instance extends Serializable { } ctx = { ...ctx, - ...this.system.staticInstances + ...this.system.staticInstances, + ...this.internalFunctions } for(const identifier in this.system.staticInstances) { this.locals.push(identifier); @@ -44,6 +46,11 @@ export default class Instance extends Serializable { this.system = system; for(const name of this.module.links.optional.arrays) this.links[name] = []; for(const name of this.module.links.optional.single) this.links[name] = null; + + for(const fnName in this.module.functions) { + this.internalFunctions[fnName] = + this.invokeInternal.bind(this, fnName); + } this.createContext(); this._link = new Proxy(this, { @@ -65,7 +72,6 @@ export default class Instance extends Serializable { log('invoking', this.module.name.full + '.' + name, 'with args', args); const content = this.module.functions[name].code; const passingArguments = _.zipObject(this.module.functions[name].parameters, args); - log('arguments obj', passingArguments); if(!content) throw new TypeError(name + ' is not a function!'); return evalInContext(content, this.context, this.locals, passingArguments); } diff --git a/test/console.v b/test/console.v new file mode 100644 index 0000000..6040c82 --- /dev/null +++ b/test/console.v @@ -0,0 +1,58 @@ +static console; + +import chalk from 'chalk'; +import tk from 'terminal-kit'; +import ansi from 'sisteransi'; + +restore { + const {terminal} = tk; + terminal.on('key', function(name, matches, data) { + if (name === 'CTRL_C') { + process.exit(2); + } + }); + console.log(this); + this.write(ansi.cursor.hide); +} + +log(a) { + if(typeof a === 'number') a = chalk.yellow(a); + + // const string = a.toString(); + + process.stdout.write(a + '\n'); +} + +choice(message, choices, type) { + const {terminal} = tk; + type ??= 'string'; + + return new Promise(res => { + + // terminal.saveCursor(); + + for(const part of message.split(/\x1b\[39m/g)) { + terminal.cyan(part); + } + terminal.cyan('\n'); + + terminal.singleColumnMenu(choices, (error, response) => { + // terminal.restoreCursor(); + this.write(ansi.cursor.left + ansi.cursor.up(2 + response.selectedIndex)); + terminal.cyan(`${message} `); + terminal.grabInput(false); + // terminal.move + + terminal(response.selectedText + '\n').eraseDisplayBelow(); + if(type === 'string') { + res(response.selectedText); + } else { + res(response.selectedIndex); + } + }); + }); +} + +write(a) { + process.stdout.write(a); +} \ No newline at end of file diff --git a/test/interface.v b/test/interface.v deleted file mode 100644 index e2bf2ae..0000000 --- a/test/interface.v +++ /dev/null @@ -1,41 +0,0 @@ -namespace vogue -static Interface; - -import 'terminal-kit' as terminalKit; - -restore { - const {terminal} = terminalKit; - terminal.grabInput(); - terminal.on('key', function(name, matches, data) { - - if (name === 'CTRL_C') { - process.exit(2); - } - }); -} - -choice(message, choices, type) { - const {terminal} = terminalKit; - type ??= 'string'; - - return new Promise(res => { - - terminal.saveCursor(); - - for(const part of message.split(/\x1b\[39m/g)) { - terminal.cyan(part); - } - terminal.cyan('\n'); - - terminal.singleColumnMenu(choices, (error, response) => { - terminal.restoreCursor(); - terminal.cyan(`${message} `); - terminal(response.selectedText + '\n').eraseDisplayBelow(); - if(type === 'string') { - res(response.selectedText); - } else { - res(response.selectedIndex); - } - }); - }); -} \ No newline at end of file diff --git a/test/main.v b/test/main.v index a1aa903..e6a19ee 100644 --- a/test/main.v +++ b/test/main.v @@ -1,11 +1,13 @@ -import 'terminal-kit' as terminalkit; singleton; link currentSave; async restore { - terminalkit.terminal.cyan('~Welcome to Vogue~\n'); - this.currentSave ??= create('world', {}); + console.log('~ Welcome to Vogue ~'); + // process.stdout.write('&'.repeat(80) + '\n'); + // process.stdout.write(JSON.stringify(console, null, 2)) + // this.currentSave ??= create('world', {}); // console.log(Interface); - const choice = await Interface.choice('select a thing', ['a', 'b', 'c']); + // console.log(console); + const choice = await console.choice('select a thing', ['a', 'b', 'c']); } \ No newline at end of file diff --git a/test/package.json b/test/package.json index 6e3d535..8acf44e 100644 --- a/test/package.json +++ b/test/package.json @@ -4,6 +4,9 @@ "main": "index.js", "license": "MIT", "dependencies": { + "chalk": "^4.1.1", + "signale": "^1.4.0", + "sisteransi": "^1.0.5", "terminal-kit": "^2.1.2" } } diff --git a/test/yarn.lock b/test/yarn.lock index e71fafd..5a5f977 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -3,169 +3,314 @@ "@cronvel/get-pixels@^3.4.0": - "integrity" "sha512-do5jDoX9oCR/dGHE4POVQ3PYDCmQ2Fow4CA72UL4WoE8zUImA/0lChczjfl+ucNjE4sXFWUnzoO6j4WzrUvLnw==" - "resolved" "https://registry.npmjs.org/@cronvel/get-pixels/-/get-pixels-3.4.0.tgz" - "version" "3.4.0" + version "3.4.0" + resolved "https://registry.npmjs.org/@cronvel/get-pixels/-/get-pixels-3.4.0.tgz" dependencies: - "jpeg-js" "^0.4.1" - "ndarray" "^1.0.19" - "ndarray-pack" "^1.1.1" - "node-bitmap" "0.0.1" - "omggif" "^1.0.10" - "pngjs" "^5.0.0" + jpeg-js "^0.4.1" + ndarray "^1.0.19" + ndarray-pack "^1.1.1" + node-bitmap "0.0.1" + omggif "^1.0.10" + pngjs "^5.0.0" -"chroma-js@^2.1.1": - "integrity" "sha512-gYc5/Dooshun2OikK7oY/hYnoEiZ0dxqRpXosEdYRYm505vU5mRsHFqIW062C9nMtr32DVErP6mlxuepo2kNkw==" - "resolved" "https://registry.npmjs.org/chroma-js/-/chroma-js-2.1.1.tgz" - "version" "2.1.1" +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: - "cross-env" "^6.0.3" + color-convert "^1.9.0" -"cross-env@^6.0.3": - "integrity" "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==" - "resolved" "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz" - "version" "6.0.3" +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" dependencies: - "cross-spawn" "^7.0.0" + color-convert "^2.0.1" -"cross-spawn@^7.0.0": - "integrity" "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==" - "resolved" "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - "version" "7.0.3" +chalk@^2.3.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" dependencies: - "path-key" "^3.1.0" - "shebang-command" "^2.0.0" - "which" "^2.0.1" + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" -"cwise-compiler@^1.1.2": - "integrity" "sha1-9NZnQQ6FDToxOn0tt7HlBbsDTMU=" - "resolved" "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz" - "version" "1.1.3" +chalk@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" dependencies: - "uniq" "^1.0.0" + ansi-styles "^4.1.0" + supports-color "^7.1.0" -"iota-array@^1.0.0": - "integrity" "sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc=" - "resolved" "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz" - "version" "1.0.0" - -"is-buffer@^1.0.2": - "integrity" "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - "resolved" "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" - "version" "1.1.6" - -"isexe@^2.0.0": - "integrity" "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - "resolved" "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - "version" "2.0.0" - -"jpeg-js@^0.4.1": - "integrity" "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q==" - "resolved" "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz" - "version" "0.4.3" - -"lazyness@^1.2.0": - "integrity" "sha512-KenL6EFbwxBwRxG93t0gcUyi0Nw0Ub31FJKN1laA4UscdkL1K1AxUd0gYZdcLU3v+x+wcFi4uQKS5hL+fk500g==" - "resolved" "https://registry.npmjs.org/lazyness/-/lazyness-1.2.0.tgz" - "version" "1.2.0" - -"ndarray-pack@^1.1.1": - "integrity" "sha1-jK6+qqJNXs9w/4YCBjeXfajuWFo=" - "resolved" "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz" - "version" "1.2.1" +chroma-js@^2.1.1: + version "2.1.1" + resolved "https://registry.npmjs.org/chroma-js/-/chroma-js-2.1.1.tgz" dependencies: - "cwise-compiler" "^1.1.2" - "ndarray" "^1.0.13" + cross-env "^6.0.3" -"ndarray@^1.0.13", "ndarray@^1.0.19": - "integrity" "sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==" - "resolved" "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz" - "version" "1.0.19" +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" dependencies: - "iota-array" "^1.0.0" - "is-buffer" "^1.0.2" + color-name "1.1.3" -"nextgen-events@^1.3.4": - "integrity" "sha512-umMRD9VOvQ7+AeCvMETA7tekqrzG0xOX2HLrpyZRuW+4NlXR5baZwY/CP7Sq3x1BkKCIa1KnI1m2+Fs+fJpOiQ==" - "resolved" "https://registry.npmjs.org/nextgen-events/-/nextgen-events-1.3.4.tgz" - "version" "1.3.4" - -"node-bitmap@0.0.1": - "integrity" "sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE=" - "resolved" "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz" - "version" "0.0.1" - -"omggif@^1.0.10": - "integrity" "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" - "resolved" "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz" - "version" "1.0.10" - -"path-key@^3.1.0": - "integrity" "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - "resolved" "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - "version" "3.1.1" - -"pngjs@^5.0.0": - "integrity" "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==" - "resolved" "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz" - "version" "5.0.0" - -"setimmediate@^1.0.5": - "integrity" "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - "resolved" "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" - "version" "1.0.5" - -"seventh@^0.7.40": - "integrity" "sha512-7sxUydQx4iEh17uJUFjZDAwbffJirldZaNIJvVB/hk9mPEL3J4GpLGSL+mHFH2ydkye46DAsLGqzFJ+/Qj5foQ==" - "resolved" "https://registry.npmjs.org/seventh/-/seventh-0.7.40.tgz" - "version" "0.7.40" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" dependencies: - "setimmediate" "^1.0.5" + color-name "~1.1.4" -"shebang-command@^2.0.0": - "integrity" "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==" - "resolved" "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - "version" "2.0.0" +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + +cross-env@^6.0.3: + version "6.0.3" + resolved "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz" dependencies: - "shebang-regex" "^3.0.0" + cross-spawn "^7.0.0" -"shebang-regex@^3.0.0": - "integrity" "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - "resolved" "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - "version" "3.0.0" +cross-spawn@^7.0.0: + version "7.0.3" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" -"string-kit@^0.12.5": - "integrity" "sha512-aB7yK0RgOx3SElEfQ6lZu2xS5hWr4ToJispiy+djJ4yh3f2zaTMCm44ZrHZnN1RiQQCLfpa5Btz2bishyBm8IQ==" - "resolved" "https://registry.npmjs.org/string-kit/-/string-kit-0.12.5.tgz" - "version" "0.12.5" +cwise-compiler@^1.1.2: + version "1.1.3" + resolved "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz" + dependencies: + uniq "^1.0.0" -"terminal-kit@^2.1.2": - "integrity" "sha512-1eG7CrQfE1dd5ZHPG5WrTk/DTeskFPqSLEl+QYmvwvI41dRCN2j1qVyxA4FwE0/x24AbjhSA3FJSIgWqQD610Q==" - "resolved" "https://registry.npmjs.org/terminal-kit/-/terminal-kit-2.1.2.tgz" - "version" "2.1.2" +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + dependencies: + is-arrayish "^0.2.1" + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +find-up@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +graceful-fs@^4.1.2: + version "4.2.6" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + +iota-array@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.0.2: + version "1.1.6" + resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" + +jpeg-js@^0.4.1: + version "0.4.3" + resolved "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz" + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + +lazyness@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/lazyness/-/lazyness-1.2.0.tgz" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +ndarray-pack@^1.1.1: + version "1.2.1" + resolved "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz" + dependencies: + cwise-compiler "^1.1.2" + ndarray "^1.0.13" + +ndarray@^1.0.13, ndarray@^1.0.19: + version "1.0.19" + resolved "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz" + dependencies: + iota-array "^1.0.0" + is-buffer "^1.0.2" + +nextgen-events@^1.3.4: + version "1.3.4" + resolved "https://registry.npmjs.org/nextgen-events/-/nextgen-events-1.3.4.tgz" + +node-bitmap@0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz" + +omggif@^1.0.10: + version "1.0.10" + resolved "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz" + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + +pkg-conf@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.1.0.tgz#2126514ca6f2abfebd168596df18ba57867f0058" + dependencies: + find-up "^2.0.0" + load-json-file "^4.0.0" + +pngjs@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz" + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" + +seventh@^0.7.40: + version "0.7.40" + resolved "https://registry.npmjs.org/seventh/-/seventh-0.7.40.tgz" + dependencies: + setimmediate "^1.0.5" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" + +signale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/signale/-/signale-1.4.0.tgz#c4be58302fb0262ac00fc3d886a7c113759042f1" + dependencies: + chalk "^2.3.2" + figures "^2.0.0" + pkg-conf "^2.1.0" + +sisteransi@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + +string-kit@^0.12.5: + version "0.12.5" + resolved "https://registry.npmjs.org/string-kit/-/string-kit-0.12.5.tgz" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + dependencies: + has-flag "^4.0.0" + +terminal-kit@^2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/terminal-kit/-/terminal-kit-2.1.2.tgz" dependencies: "@cronvel/get-pixels" "^3.4.0" - "chroma-js" "^2.1.1" - "lazyness" "^1.2.0" - "ndarray" "^1.0.19" - "nextgen-events" "^1.3.4" - "seventh" "^0.7.40" - "string-kit" "^0.12.5" - "tree-kit" "^0.7.0" + chroma-js "^2.1.1" + lazyness "^1.2.0" + ndarray "^1.0.19" + nextgen-events "^1.3.4" + seventh "^0.7.40" + string-kit "^0.12.5" + tree-kit "^0.7.0" -"tree-kit@^0.7.0": - "integrity" "sha512-MAqFo2oJJ39zmxq3xETx0nMAgZw2z6pnJPjIAehEcrDaeePDhBBTshAlyhCDtezMDTIu1Av+vGE501xN3Sh8VA==" - "resolved" "https://registry.npmjs.org/tree-kit/-/tree-kit-0.7.0.tgz" - "version" "0.7.0" +tree-kit@^0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/tree-kit/-/tree-kit-0.7.0.tgz" -"uniq@^1.0.0": - "integrity" "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" - "resolved" "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz" - "version" "1.0.1" +uniq@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz" -"which@^2.0.1": - "integrity" "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==" - "resolved" "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - "version" "2.0.2" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" dependencies: - "isexe" "^2.0.0" + isexe "^2.0.0" diff --git a/test2/uhhh.v b/test2/uhhh.v new file mode 100644 index 0000000..717c876 --- /dev/null +++ b/test2/uhhh.v @@ -0,0 +1,9 @@ +singleton; + +restore { + this.foo(); +} + +foo { + console.log('foo!'); +} \ No newline at end of file