import type { Node as SyntaxNode } from "web-tree-sitter"; import type { BirdDeclaration, ProtocolStatement, SourceRange } from "../types.js"; export type IncludeDeclaration = Extract; export type DefineDeclaration = Extract; export type RouterIdDeclaration = Extract; export type GracefulRestartWaitDeclaration = Extract; export type HostnameOverrideDeclaration = Extract; export type AttributeDeclaration = Extract; export type TableDeclaration = Extract; export type MplsDomainDeclaration = Extract; export type TimeformatDeclaration = Extract; export type WatchdogDeclaration = Extract; export type ProtocolDeclaration = Extract; export type TemplateDeclaration = Extract; export type FilterDeclaration = Extract; export type FunctionDeclaration = Extract; export type ExtractedLiteral = FilterDeclaration["literals"][number]; export type MatchExpression = FilterDeclaration["matches"][number]; type ChannelStatement = Extract; export declare const PROTOCOL_STATEMENT_TYPES: Set; export declare const splitTopLevelStatements: (body: string) => string[]; /** * Remove trailing line comments (`#`, `//`) and block comments (`/* ... *\/`) while preserving quoted strings. * Useful when parsing statement text that may contain inline comments. */ export declare const stripTrailingComment: (value: string) => string; export declare const TABLE_TYPES: Set; export declare const isStrictIpv4Literal: (value: string) => boolean; export declare const isStrictIpv6Literal: (value: string) => boolean; export declare const isStrictIpLiteral: (value: string) => boolean; export declare const isIpLiteralCandidate: (value: string) => boolean; export declare const protocolStatementNodesOf: (blockNode: SyntaxNode) => SyntaxNode[]; export declare const protocolTypeTextAndRange: (protocolTypeNode: SyntaxNode | null, protocolVariantNode: SyntaxNode | null, source: string, declarationRange: SourceRange) => { protocolType: string; protocolTypeRange: SourceRange; }; export declare const normalizeTableType: (value: string) => TableDeclaration["tableType"]; export declare const normalizeChannelType: (value: string) => ChannelStatement["channelType"]; export declare const nodeOrSelf: (node: SyntaxNode) => SyntaxNode; export declare const CHANNEL_DIRECTIONS: Set; export declare const isNumericToken: (value: string) => boolean; export declare const normalizeRouterIdFromSource: (raw: string) => string; export interface TopLevelToken { text: string; lowered: string; range: SourceRange; } export declare const topLevelTokensOf: (statementNode: SyntaxNode, source: string) => TopLevelToken[]; export declare const mergedTokenRange: (declarationRange: SourceRange, tokens: TopLevelToken[], startIndex: number, endIndex: number) => SourceRange; export {}; //# sourceMappingURL=shared.d.ts.map