import { AssignmentExpressionNode, CallNode, CaseNode, ExpressionNode, ImportFromNode, IndexNode, MatchNode, MemberAccessNode, NameNode, SuiteNode } from '../parser/parseNodes'; export declare enum FlowFlags { UnreachableStructural = 1,// Code that is structurally unreachable (e.g. following a return statement) UnreachableStaticCondition = 2,// code that is unreachable due to a condition that the binder evaluates to False Start = 4,// Entry point BranchLabel = 8,// Junction for forward control flow LoopLabel = 16,// Junction for backward control flow Assignment = 32,// Assignment statement Unbind = 64,// Used with assignment to indicate target should be unbound WildcardImport = 128,// For "from X import *" statements TrueCondition = 256,// Condition known to be true FalseCondition = 512,// Condition known to be false Call = 1024,// Call node PreFinallyGate = 2048,// Injected edge that links pre-finally label and pre-try flow PostFinally = 4096,// Injected edge that links post-finally flow with the rest of the graph VariableAnnotation = 16384,// Separates a variable annotation from its name node PostContextManager = 32768,// Label that's used for context managers that suppress exceptions TrueNeverCondition = 65536,// Condition whose type evaluates to never when narrowed in positive test FalseNeverCondition = 131072,// Condition whose type evaluates to never when narrowed in negative test NarrowForPattern = 262144,// Narrow the type of the subject expression within a case statement ExhaustedMatch = 524288 } export type CodeFlowReferenceExpressionNode = NameNode | MemberAccessNode | IndexNode | AssignmentExpressionNode; export declare function getUniqueFlowNodeId(): number; export interface FlowNode { flags: FlowFlags; id: number; } export interface FlowLabel extends FlowNode { antecedents: FlowNode[]; affectedExpressions: Set | undefined; } export interface FlowBranchLabel extends FlowLabel { preBranchAntecedent: FlowNode | undefined; } export interface FlowAssignment extends FlowNode { node: CodeFlowReferenceExpressionNode; antecedent: FlowNode; targetSymbolId: number; } export interface FlowVariableAnnotation extends FlowNode { antecedent: FlowNode; } export interface FlowWildcardImport extends FlowNode { node: ImportFromNode; names: string[]; antecedent: FlowNode; } export interface FlowCondition extends FlowNode { expression: ExpressionNode; reference?: NameNode | undefined; antecedent: FlowNode; } export interface FlowNarrowForPattern extends FlowNode { subjectExpression: ExpressionNode; statement: CaseNode | MatchNode; antecedent: FlowNode; } export interface FlowExhaustedMatch extends FlowNode { node: MatchNode; subjectExpression: ExpressionNode; antecedent: FlowNode; } export interface FlowCall extends FlowNode { node: CallNode; antecedent: FlowNode; } export interface FlowPreFinallyGate extends FlowNode { antecedent: FlowNode; } export interface FlowPostFinally extends FlowNode { antecedent: FlowNode; finallyNode: SuiteNode; preFinallyGate: FlowPreFinallyGate; } export interface FlowPostContextManagerLabel extends FlowLabel { expressions: ExpressionNode[]; isAsync: boolean; blockIfSwallowsExceptions: boolean; } export declare function isCodeFlowSupportedForReference(reference: ExpressionNode): reference is CodeFlowReferenceExpressionNode; export declare function createKeyForReference(reference: CodeFlowReferenceExpressionNode): string; export declare function createKeysForReferenceSubexpressions(reference: CodeFlowReferenceExpressionNode): string[]; export declare const wildcardImportReferenceKey = "*";