UNPKG

kui-shell

Version:

This is the monorepo for Kui, the hybrid command-line/GUI electron-based Kubernetes tool

73 lines 2.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function isLiteral(ast) { return ast.type === 'literal' || ast.type === 'value'; } exports.isLiteral = isLiteral; function isConditional(ast) { return ast.type === 'if'; } exports.isConditional = isConditional; function isWhile(ast) { return ast.type === 'while' || ast.type === 'while_nosave'; } exports.isWhile = isWhile; function isDoWhile(ast) { return ast.type === 'dowhile' || ast.type === 'dowhile_nosave'; } exports.isDoWhile = isDoWhile; function isTry(ast) { return ast.type === 'try'; } exports.isTry = isTry; function isAction(ast) { return ast.type === 'action'; } exports.isAction = isAction; function isFunction(ast) { return ast.type === 'function'; } exports.isFunction = isFunction; function isFinally(ast) { return ast.type === 'finally'; } exports.isFinally = isFinally; function isOn(ast) { return ast.type === 'on'; } exports.isOn = isOn; function isRetryOrRepeat(ast) { return ast.type === 'retry' || ast.type === 'repeat'; } exports.isRetryOrRepeat = isRetryOrRepeat; function isLet(ast) { return ast.type === 'let'; } exports.isLet = isLet; function isSequence(ast) { return ast.type === 'sequence' || ast.type === 'seq'; } exports.isSequence = isSequence; function isRetain(ast) { return ast.type === 'retain'; } exports.isRetain = isRetain; function isComponentBearing(ast) { const cb = ast; return typeof cb.components === 'object'; } exports.isComponentBearing = isComponentBearing; function isComponentArrayBearing(ast) { const cb = ast; return Array.isArray(cb.components) && cb.components.length > 0; } exports.isComponentArrayBearing = isComponentArrayBearing; function isParallelLike(ast) { return ast.type === 'parallel' || ast.type === 'par' || ast.type === 'map' || ast.type === 'forall'; } exports.isParallelLike = isParallelLike; function isMapLike(ast) { return ast.type === 'map' || ast.type === 'forall'; } exports.isMapLike = isMapLike; //# sourceMappingURL=ast.js.map