import { ParameterDeclarationASTNode } from "../../../../ast/ast_declarations"; import { BlockContext, SemanticContext, TranslationUnitContext } from "../../../compilation/contexts"; import { LocalObjectEntity, LocalReferenceEntity } from "../../../compilation/entities"; import { AnalyticConstruct } from "../../../../analysis/predicates"; import { PotentialParameterType } from "../../../compilation/types"; import { SuccessfullyCompiled } from "../../CPPConstruct"; import { BasicCPPConstruct } from "../../BasicCPPConstruct"; import { OtherSpecifiers } from "../declarations"; import { CompiledDeclarator, Declarator, TypedDeclarator } from "../Declarator"; import { CompiledStorageSpecifier, StorageSpecifier } from "../StorageSpecifier"; import { CompiledTypeSpecifier, TypeSpecifier } from "../TypeSpecifier"; import { ParameterDefinition } from "./ParameterDefinition"; /** * ParameterDeclarations are a bit different than other declarations because * they do not introduce an entity into their contextual scope. For example, * in the context of a function declaration that contains several parameter * declarations, there is no function body (as there would be for a function * definition) into whose scope the entities would even be introduced. * This contrasts to ParameterDefinitions that may introduce an entity. */ export declare class ParameterDeclaration extends BasicCPPConstruct { readonly construct_type = "parameter_declaration"; readonly typeSpecifier: TypeSpecifier; readonly storageSpecifier: StorageSpecifier; readonly declarator: Declarator; readonly otherSpecifiers: OtherSpecifiers; readonly name?: string; readonly type?: PotentialParameterType; readonly declaredEntity?: LocalObjectEntity | LocalReferenceEntity; readonly position: number; constructor(context: TranslationUnitContext, ast: ParameterDeclarationASTNode, typeSpec: TypeSpecifier, storageSpec: StorageSpecifier, declarator: Declarator, otherSpecs: OtherSpecifiers, position: number); static createFromAST(ast: ParameterDeclarationASTNode, position: number, context: TranslationUnitContext): ParameterDeclaration; isPotentialParameterDefinition(): this is ParameterDefinition; addEntityToScope(this: ParameterDefinition, context: BlockContext): void; isSemanticallyEquivalent_impl(other: AnalyticConstruct, equivalenceContext: SemanticContext): boolean; } export interface TypedParameterDeclaration extends ParameterDeclaration { readonly type: T; readonly declarator: TypedDeclarator; } export interface CompiledParameterDeclaration extends TypedParameterDeclaration, SuccessfullyCompiled { readonly typeSpecifier: CompiledTypeSpecifier; readonly storageSpecifier: CompiledStorageSpecifier; readonly declarator: CompiledDeclarator; }