import { type ComponentPlan, type StraightlineDialect } from "./straightline.js"; export declare function setRustForceRunPlanImports(req: { runPlan: boolean; relationKind: boolean; json: boolean; } | null): void; /** string を rust 文字列リテラルへ(path セグメント用。JSON エスケープで安全側)。 */ declare function rustStrLit(s: string): string; /** * emitExpr — Expression IR ノードを rust の「scope を受けて `R`(= Result)を * 返す」式へ落とす。**単純式はネイティブ化**(式ツリー解釈 `evaluate` を消す — bc#39 AC#2 の * 脱解釈の実体)、overflow/短絡系のみ A0 primitive SSoT を直呼びする: * * - `concat` → `primitives::concat_native(&[?, …])`(native 連結。`evaluate` 非経由) * - `ref`/`refOpt`(静的 path)→ `primitives::ref_native(&["a","b"], scope)` 等(native scope walk) * - それ以外の演算子 → 対応する A0 evaluate 委譲 primitive(被演算子は未評価 IR リテラル) * - スカラ/ null / bool リテラルや非静的 path・未知形 → `primitives::eval_expr(&json!(..), scope)` * (同一 SSoT。型判定を生成コードに残さない) * * Portability Guard を通過済み(生成時検査)なので未知 operator はここに来ない。 * 返り値は必ず `R` 型の rust 式(呼び側が `?` で Value へ展開する)。 */ declare function emitExpr(node: unknown, scopeVar: string): string; /** component 名 → rust 関数名の一部(決定的・一意は DUPLICATE_COMPONENT で保証)。 */ declare function sanitize(name: string): string; /** ops リテラル(run_plan に渡す OpSpec の Vec を綴じる rust コード)。 */ declare function emitOpsLiteral(plan: ComponentPlan): string; /** plan(ExecutionPlanSpec)リテラルを rust の `Some(&ExecutionPlanSpec{..})` へ(fully-qualified)。 */ declare function emitPlanLiteral(plan: unknown): string; /** * rust-typed(bc#48)が struct-native exec を綴じるために再利用する内部 emit ヘルパ。straight-line の * plan/handler-dispatch SSoT(run_plan primitive + handlers.exec_ctx + native/primitive port eval)を * そのまま使い、「結果を Value scope でなく struct scope に持つ」差分だけを typed 側で足すための seam。 * primitive namespace(P)と ops/plan リテラル・式 emit・sanitize を共有する(意味論の二重実装を避ける)。 * go の {@link goStraightlineInternals} と同型(seam が language-neutral であることの担保)。 */ export declare const rustStraightlineInternals: { P: string; SCOPE: string; emitExpr: typeof emitExpr; emitOpsLiteral: typeof emitOpsLiteral; emitPlanLiteral: typeof emitPlanLiteral; rustStrLit: typeof rustStrLit; sanitize: typeof sanitize; dialect: StraightlineDialect; }; export {}; //# sourceMappingURL=emit-shared-rust.d.ts.map