fez-lisp 1.6.12 → 1.6.13
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/package.json +1 -1
- package/src/utils.js +9 -0
package/package.json
CHANGED
package/src/utils.js
CHANGED
@@ -318,6 +318,7 @@ export const ast = (source, deps) =>
|
|
318
318
|
|
319
319
|
export const astWithStd = (source) => wrapInBlock(shake(prep(source), std))
|
320
320
|
export const unwrapped = (source) => shake(prep(source), std)
|
321
|
+
export const unwrapDo = (ast) => ast[1][1]
|
321
322
|
export const parse = (source) =>
|
322
323
|
wrapInBlock(
|
323
324
|
shake(
|
@@ -348,6 +349,14 @@ export const addTypeIdentities = (ast) => {
|
|
348
349
|
identity(STATIC_TYPES.UNKNOWN)
|
349
350
|
)
|
350
351
|
}
|
352
|
+
export const isInputVariable = (x) =>
|
353
|
+
x &&
|
354
|
+
x[0] &&
|
355
|
+
x[0][TYPE] === APPLY &&
|
356
|
+
x[0][VALUE] === 'let' &&
|
357
|
+
x[1] &&
|
358
|
+
x[1][TYPE] === WORD &&
|
359
|
+
x[1][VALUE] === 'INPUT'
|
351
360
|
|
352
361
|
export const UTILS = {
|
353
362
|
handleUnbalancedQuotes,
|