1 | import { AST } from '@glimmer/syntax';
|
2 | import { Option, WireFormat, ExpressionContext } from '@glimmer/interfaces';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | export declare type PathHead = string | 0;
|
8 | export interface SourceLocation {
|
9 | source: string | null;
|
10 | start: number;
|
11 | end: number;
|
12 | }
|
13 | export interface InputOps {
|
14 | startProgram: [AST.Template];
|
15 | endProgram: [AST.Template];
|
16 | startBlock: [AST.Block];
|
17 | endBlock: [AST.Block];
|
18 | block: [AST.BlockStatement];
|
19 | mustache: [AST.MustacheStatement];
|
20 | openElement: [AST.ElementNode];
|
21 | closeElement: [AST.ElementNode];
|
22 | text: [AST.TextNode];
|
23 | comment: [AST.CommentStatement];
|
24 | }
|
25 | export interface AllocateSymbolsOps {
|
26 | startProgram: AST.Template;
|
27 | endProgram: void;
|
28 | startBlock: AST.Block;
|
29 | endBlock: void;
|
30 | append: boolean;
|
31 | text: string;
|
32 | comment: string;
|
33 | block: [number, Option<number>];
|
34 | yield: string;
|
35 | debugger: null;
|
36 | hasBlock: string;
|
37 | hasBlockParams: string;
|
38 | partial: void;
|
39 | openElement: [AST.ElementNode, boolean];
|
40 | closeElement: AST.ElementNode;
|
41 | openComponent: AST.ElementNode;
|
42 | closeComponent: AST.ElementNode;
|
43 | openNamedBlock: AST.ElementNode;
|
44 | closeNamedBlock: AST.ElementNode;
|
45 | closeDynamicComponent: AST.ElementNode;
|
46 | flushElement: AST.ElementNode;
|
47 | staticArg: string;
|
48 | dynamicArg: string;
|
49 | staticAttr: [string, Option<string>];
|
50 | staticComponentAttr: [string, Option<string>];
|
51 | componentAttr: [string, Option<string>];
|
52 | dynamicAttr: [string, Option<string>];
|
53 | trustingComponentAttr: [string, Option<string>];
|
54 | trustingAttr: [string, Option<string>];
|
55 | attrSplat: void;
|
56 | getVar: [string, ExpressionContext];
|
57 | getArg: string;
|
58 | getFree: string;
|
59 | getThis: void;
|
60 | getPath: string[];
|
61 | modifier: void;
|
62 | helper: void;
|
63 | literal: string | boolean | number | null | undefined;
|
64 | concat: void;
|
65 | prepareArray: number;
|
66 | prepareObject: number;
|
67 | }
|
68 | export interface JavaScriptCompilerOps {
|
69 | text: string;
|
70 | comment: string;
|
71 | openElement: [AST.ElementNode, boolean];
|
72 | closeElement: AST.ElementNode;
|
73 | openComponent: AST.ElementNode;
|
74 | closeComponent: AST.ElementNode;
|
75 | openNamedBlock: AST.ElementNode;
|
76 | closeNamedBlock: AST.ElementNode;
|
77 | closeDynamicComponent: AST.ElementNode;
|
78 | flushElement: AST.ElementNode;
|
79 | staticAttr: [string, string?];
|
80 | staticComponentAttr: [string, string?];
|
81 | componentAttr: [string, string?];
|
82 | dynamicAttr: [string, string?];
|
83 | trustingComponentAttr: [string, string?];
|
84 | trustingAttr: [string, string?];
|
85 | helper: void;
|
86 | modifier: void;
|
87 | block: [number, Option<number>];
|
88 | attrSplat: Option<number>;
|
89 | getPath: string[];
|
90 | getSymbol: number;
|
91 | getFree: number;
|
92 | getFreeWithContext: [number, ExpressionContext];
|
93 | yield: number;
|
94 | hasBlock: number;
|
95 | hasBlockParams: number;
|
96 | debugger: WireFormat.Core.EvalInfo;
|
97 | partial: WireFormat.Core.EvalInfo;
|
98 | }
|
99 | export declare type Processor<InOps extends PipelineOps> = {
|
100 | [P in keyof InOps]: InOps[P] extends void ? () => void : (op: InOps[P]) => void;
|
101 | };
|
102 | export declare type PipelineOps = InputOps | AllocateSymbolsOps | JavaScriptCompilerOps;
|
103 | export declare type OpsDict<O extends PipelineOps> = {
|
104 | [K in keyof O]: O[K] extends void ? [K] : [K, O[K]];
|
105 | };
|
106 | export declare type Ops<O extends PipelineOps> = OpsDict<O>[keyof O];
|
107 | export declare type Op<O extends PipelineOps, K extends keyof O> = OpsDict<O>[K];
|
108 |
|
\ | No newline at end of file |