import { DiscriminateUnion } from "../util/util"; import { CPPConstruct } from "../core/constructs/CPPConstruct"; import { AnalyticDeclaration, AnalyticTypedDeclaration } from "../core/constructs/declarations/analytics"; import { BaseSpecifier } from "../core/constructs/declarations/class/BaseSpecifier"; import { FunctionDefinition } from "../core/constructs/declarations/function/FunctionDefinition"; import { StorageSpecifier } from "../core/constructs/declarations/StorageSpecifier"; import { TypeSpecifier } from "../core/constructs/declarations/TypeSpecifier"; import { GlobalVariableDefinition } from "../core/constructs/declarations/variable/GlobalVariableDefinition"; import { LocalVariableDefinition } from "../core/constructs/declarations/variable/LocalVariableDefinition"; import { VariableEntity } from "../core/compilation/entities"; import { Expression, TypedExpression, ValueCategory } from "../core/constructs/expressions/Expression"; import { AnalyticExpression, AnalyticTypedExpression } from "../core/constructs/expressions/expressions"; import { t_OverloadableOperators } from "../core/constructs/expressions/selectOperatorOverload"; import { OperatorOverloadExpression } from "../core/constructs/expressions/OperatorOverloadExpression"; import { IdentifierExpression } from "../core/constructs/expressions/IdentifierExpression"; import { PostfixIncrementExpression } from "../core/constructs/expressions/PostfixIncrementExpression"; import { ArrowExpression } from "../core/constructs/expressions/ArrowExpression"; import { DotExpression } from "../core/constructs/expressions/DotExpression"; import { SubscriptExpression } from "../core/constructs/expressions/SubscriptExpression"; import { PrefixIncrementExpression } from "../core/constructs/expressions/PrefixIncrementExpression"; import { CompoundAssignmentExpression } from "../core/constructs/expressions/CompoundAssignmentExpression"; import { AssignmentExpression } from "../core/constructs/expressions/AssignmentExpression"; import { FunctionCall } from "../core/constructs/FunctionCall"; import { FunctionCallExpression } from "../core/constructs/expressions/FunctionCallExpression"; import { GlobalObjectAllocator } from "../core/constructs/GlobalObjectAllocator"; import { CtorInitializer } from "../core/constructs/initializers/CtorInitializer"; import { ObjectDeallocator } from "../core/constructs/ObjectDeallocator"; import { AnalyticStatement } from "../core/constructs/statements/statements"; import { TemporaryDeallocator } from "../core/constructs/TemporaryDeallocator"; import { ExpressionType, Type } from "../core/compilation/types"; import { AnalyticInitializer } from "../core/constructs/initializers/initializers"; export declare type ConstructKind = Cs["construct_type"]; export declare type AnalyticConstruct = AnalyticDeclaration | TypeSpecifier | StorageSpecifier | AnalyticExpression | AnalyticStatement | GlobalObjectAllocator | ObjectDeallocator | TemporaryDeallocator | BaseSpecifier | FunctionCall | AnalyticInitializer | CtorInitializer; export declare namespace Predicates { function byKind>(constructKind: NarrowedKind): >(construct: Original) => construct is Narrowed extends Original ? Narrowed : never; function byKinds>(constructKinds: readonly NarrowedKind[]): >(construct: Original) => construct is Narrowed extends Original ? Narrowed : never; function byTypedExpression(typePredicate?: (o: ExpressionType) => o is NarrowedT, valueCategory?: NarrowedVC): : never>(construct: Original) => construct is Narrowed extends Original ? Narrowed : never; function isTypedExpression, Narrowed extends (Original extends AnalyticExpression ? AnalyticTypedExpression : never)>(construct: Original, typePredicate?: (o: ExpressionType) => o is NarrowedT, valueCategory?: NarrowedVC): construct is (Narrowed extends Original ? Narrowed : Original extends Narrowed ? Original : never); function isTypedExpression, Narrowed extends (Original extends Expression ? TypedExpression : never)>(construct: Original, typePredicate: (o: ExpressionType) => o is NarrowedT, valueCategory?: NarrowedVC): construct is (Narrowed extends Original ? Narrowed : Original extends Narrowed ? Original : never); function byTypedDeclaration(typePredicate?: (o: Type) => o is NarrowedT): : never>(construct: Original) => construct is Narrowed extends Original ? Narrowed : never; function isTypedDeclaration : never)>(construct: Original, typePredicate?: (o: Type) => o is NarrowedT): construct is (Narrowed extends Original ? Narrowed : never); function byVariableName(name: string): (construct: AnalyticConstruct) => construct is GlobalVariableDefinition | LocalVariableDefinition; function byVariableInitialValue(queryValue: number): (construct: AnalyticConstruct) => construct is GlobalVariableDefinition | LocalVariableDefinition; function byVariableUpdate(name: string): (construct: AnalyticConstruct) => construct is AssignmentExpression | PrefixIncrementExpression | PostfixIncrementExpression; function byFunctionName(name: string): (construct: AnalyticConstruct) => construct is FunctionDefinition; function byFunctionCallName(name: N): (construct: AnalyticConstruct) => construct is FunctionCallExpression & { call: FunctionCall; }; function byOperatorOverloadCall(operator: t_OverloadableOperators): (construct: AnalyticConstruct) => construct is OperatorOverloadExpression; function byIdentifierName(name: N): (construct: AnalyticConstruct) => construct is IdentifierExpression & { name: N; }; function byVariableIdentifier(v: VE): (construct: AnalyticConstruct) => construct is IdentifierExpression & { entity: VE; }; function byVariableAssignedTo(v: VE): (construct: AnalyticConstruct) => construct is AssignmentExpression | CompoundAssignmentExpression; function byVariableIncremented(v: VE): (construct: AnalyticConstruct) => construct is PrefixIncrementExpression | PostfixIncrementExpression; function byMemberAccessName(memberName: N): (construct: AnalyticConstruct) => construct is DotExpression | (ArrowExpression & { memberName: N; }); const isLoop: >(construct: Original) => construct is Narrowed extends Original ? Narrowed : never; const isOperatorOverload: >(construct: Original) => construct is Narrowed extends Original ? Narrowed : never; function isIndexingOperation(construct: AnalyticConstruct): construct is SubscriptExpression | OperatorOverloadExpression; const isBinaryOperatorExpression: >(construct: Original) => construct is Narrowed extends Original ? Narrowed : never; }