🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

@microsoft/powerquery-parser

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/powerquery-parser - npm Package Compare versions

Comparing version

to
0.4.15

@@ -20,5 +20,6 @@ import { Ast } from "../../../language";

export declare function maybeUnboxNthChildIfContextChecked<T extends Ast.TNode>(nodeIdMapCollection: Collection, parentId: number, attributeIndex: number, expectedNodeKinds: ReadonlyArray<T["kind"]> | T["kind"]): ParseContext.Node<T> | undefined;
export declare function maybeUnboxIfAst(nodeIdMapCollection: Collection, nodeId: number): Ast.TWrapped | undefined;
export declare function maybeUnboxIfAst(nodeIdMapCollection: Collection, nodeId: number): Ast.TNode | undefined;
export declare function maybeUnboxWrappedContent(nodeIdMapCollection: Collection, nodeId: number): TXorNode | undefined;
export declare function maybeUnboxWrappedContentChecked<C extends Ast.TWrapped["content"]>(nodeIdMapCollection: Collection, nodeId: number, expectedNodeKinds: ReadonlyArray<C["kind"]> | C["kind"]): XorNode<C> | undefined;
export declare function maybeUnboxWrappedContentIfAst(nodeIdMapCollection: Collection, nodeId: number): Ast.TNode | undefined;
export declare function maybeUnboxWrappedContentIfAstChecked<C extends Ast.TWrapped["content"]>(nodeIdMapCollection: Collection, nodeId: number, expectedNodeKinds: ReadonlyArray<C["kind"]> | C["kind"]): C | undefined;
export declare function maybeWrappedContent(nodeIdMapCollection: Collection, nodeId: number): TXorNode | undefined;
export declare function maybeUnboxWrappedContentChecked<C extends Ast.TWrapped["content"]>(nodeIdMapCollection: Collection, nodeId: number, expectedNodeKinds: ReadonlyArray<C["kind"]> | C["kind"]): XorNode<C> | undefined;

@@ -16,3 +16,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.maybeUnboxWrappedContentChecked = exports.maybeWrappedContent = exports.maybeUnboxWrappedContentIfAstChecked = exports.maybeUnboxIfAst = exports.maybeUnboxNthChildIfContextChecked = exports.maybeUnboxNthChildIfContext = exports.maybeUnboxNthChildIfAstChecked = exports.maybeUnboxNthChildIfAst = exports.maybeUnboxArrayWrapper = exports.maybeNthChildChecked = exports.maybeNthChild = exports.assertUnboxNthChildAsContextChecked = exports.assertUnboxNthChildAsContext = exports.assertUnboxNthChildAsAstChecked = exports.assertUnboxNthChildAsAst = exports.assertUnboxArrayWrapperAst = exports.assertGetNthChildChecked = exports.assertGetNthChild = exports.assertGetChildren = void 0;
exports.maybeUnboxWrappedContentIfAstChecked = exports.maybeUnboxWrappedContentIfAst = exports.maybeUnboxWrappedContentChecked = exports.maybeUnboxWrappedContent = exports.maybeUnboxIfAst = exports.maybeUnboxNthChildIfContextChecked = exports.maybeUnboxNthChildIfContext = exports.maybeUnboxNthChildIfAstChecked = exports.maybeUnboxNthChildIfAst = exports.maybeUnboxArrayWrapper = exports.maybeNthChildChecked = exports.maybeNthChild = exports.assertUnboxNthChildAsContextChecked = exports.assertUnboxNthChildAsContext = exports.assertUnboxNthChildAsAstChecked = exports.assertUnboxNthChildAsAst = exports.assertUnboxArrayWrapperAst = exports.assertGetNthChildChecked = exports.assertGetNthChild = exports.assertGetChildren = void 0;
var __1 = require("..");

@@ -138,22 +138,29 @@ var common_1 = require("../../../common");

function maybeUnboxIfAst(nodeIdMapCollection, nodeId) {
var maybeXorNode = maybeWrappedContent(nodeIdMapCollection, nodeId);
return maybeXorNode && __1.XorNodeUtils.isAstXor(maybeXorNode) && __1.XorNodeUtils.isTWrapped(maybeXorNode)
? maybeXorNode.node
: undefined;
var maybeXorNode = commonSelectors_1.maybeXor(nodeIdMapCollection, nodeId);
return maybeXorNode && __1.XorNodeUtils.isAstXor(maybeXorNode) ? maybeXorNode.node : undefined;
}
exports.maybeUnboxIfAst = maybeUnboxIfAst;
function maybeUnboxWrappedContentIfAstChecked(nodeIdMapCollection, nodeId, expectedNodeKinds) {
var maybeAstNode = maybeUnboxIfAst(nodeIdMapCollection, nodeId);
return maybeAstNode && language_1.AstUtils.isNodeKind(maybeAstNode, expectedNodeKinds) ? maybeAstNode : undefined;
}
exports.maybeUnboxWrappedContentIfAstChecked = maybeUnboxWrappedContentIfAstChecked;
function maybeWrappedContent(nodeIdMapCollection, nodeId) {
function maybeUnboxWrappedContent(nodeIdMapCollection, nodeId) {
var maybeWrapperXorNode = commonSelectors_1.maybeXor(nodeIdMapCollection, nodeId);
if (maybeWrapperXorNode === undefined || !__1.XorNodeUtils.isTWrapped(maybeWrapperXorNode)) {
return undefined;
}
return maybeNthChild(nodeIdMapCollection, nodeId, 1);
}
exports.maybeWrappedContent = maybeWrappedContent;
exports.maybeUnboxWrappedContent = maybeUnboxWrappedContent;
function maybeUnboxWrappedContentChecked(nodeIdMapCollection, nodeId, expectedNodeKinds) {
var maybeXorNode = maybeWrappedContent(nodeIdMapCollection, nodeId);
var maybeXorNode = maybeUnboxWrappedContent(nodeIdMapCollection, nodeId);
return maybeXorNode && __1.XorNodeUtils.isNodeKind(maybeXorNode, expectedNodeKinds) ? maybeXorNode : undefined;
}
exports.maybeUnboxWrappedContentChecked = maybeUnboxWrappedContentChecked;
function maybeUnboxWrappedContentIfAst(nodeIdMapCollection, nodeId) {
var maybeXorNode = maybeUnboxWrappedContent(nodeIdMapCollection, nodeId);
return maybeXorNode && __1.XorNodeUtils.isAstXor(maybeXorNode) ? maybeXorNode.node : undefined;
}
exports.maybeUnboxWrappedContentIfAst = maybeUnboxWrappedContentIfAst;
function maybeUnboxWrappedContentIfAstChecked(nodeIdMapCollection, nodeId, expectedNodeKinds) {
var maybeAstNode = maybeUnboxWrappedContentIfAst(nodeIdMapCollection, nodeId);
return maybeAstNode && language_1.AstUtils.isNodeKind(maybeAstNode, expectedNodeKinds) ? maybeAstNode : undefined;
}
exports.maybeUnboxWrappedContentIfAstChecked = maybeUnboxWrappedContentIfAstChecked;
//# sourceMappingURL=childSelectors.js.map
{
"name": "@microsoft/powerquery-parser",
"version": "0.4.14",
"version": "0.4.15",
"description": "A parser for the Power Query/M formula language.",

@@ -5,0 +5,0 @@ "author": "Microsoft",