File: parserRealSource5.symbols

package info (click to toggle)
node-typescript 5.0.4%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 459,116 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (203 lines) | stat: -rw-r--r-- 9,855 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
=== tests/cases/conformance/parser/ecmascript5/parserRealSource5.ts ===
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. 
// See LICENSE.txt in the project root for complete license information.

///<reference path='typescript.ts' />

module TypeScript {
>TypeScript : Symbol(TypeScript, Decl(parserRealSource5.ts, 0, 0))

    // TODO: refactor indent logic for use in emit
    export class PrintContext {
>PrintContext : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))

        public builder = "";
>builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))

        public indent1 = "  ";
>indent1 : Symbol(PrintContext.indent1, Decl(parserRealSource5.ts, 8, 28))

        public indentStrings: string[] = [];
>indentStrings : Symbol(PrintContext.indentStrings, Decl(parserRealSource5.ts, 9, 30))

        public indentAmt = 0;
>indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))

        constructor (public outfile: ITextWriter, public parser: Parser) {
>outfile : Symbol(PrintContext.outfile, Decl(parserRealSource5.ts, 13, 21))
>ITextWriter : Symbol(ITextWriter, Decl(lib.scripthost.d.ts, --, --))
>parser : Symbol(PrintContext.parser, Decl(parserRealSource5.ts, 13, 49))
>Parser : Symbol(Parser)
        }

        public increaseIndent() {
>increaseIndent : Symbol(PrintContext.increaseIndent, Decl(parserRealSource5.ts, 14, 9))

            this.indentAmt++;
>this.indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
        }

        public decreaseIndent() {
>decreaseIndent : Symbol(PrintContext.decreaseIndent, Decl(parserRealSource5.ts, 18, 9))

            this.indentAmt--;
>this.indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
        }

        public startLine() {
>startLine : Symbol(PrintContext.startLine, Decl(parserRealSource5.ts, 22, 9))

            if (this.builder.length > 0) {
>this.builder.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --))
>this.builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>length : Symbol(String.length, Decl(lib.es5.d.ts, --, --))

                CompilerDiagnostics.Alert(this.builder);
>this.builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
            }
            var indentString = this.indentStrings[this.indentAmt];
>indentString : Symbol(indentString, Decl(parserRealSource5.ts, 28, 15))
>this.indentStrings : Symbol(PrintContext.indentStrings, Decl(parserRealSource5.ts, 9, 30))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>indentStrings : Symbol(PrintContext.indentStrings, Decl(parserRealSource5.ts, 9, 30))
>this.indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))

            if (indentString === undefined) {
>indentString : Symbol(indentString, Decl(parserRealSource5.ts, 28, 15))
>undefined : Symbol(undefined)

                indentString = "";
>indentString : Symbol(indentString, Decl(parserRealSource5.ts, 28, 15))

                for (var i = 0; i < this.indentAmt; i++) {
>i : Symbol(i, Decl(parserRealSource5.ts, 31, 24))
>i : Symbol(i, Decl(parserRealSource5.ts, 31, 24))
>this.indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
>i : Symbol(i, Decl(parserRealSource5.ts, 31, 24))

                    indentString += this.indent1;
>indentString : Symbol(indentString, Decl(parserRealSource5.ts, 28, 15))
>this.indent1 : Symbol(PrintContext.indent1, Decl(parserRealSource5.ts, 8, 28))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>indent1 : Symbol(PrintContext.indent1, Decl(parserRealSource5.ts, 8, 28))
                }
                this.indentStrings[this.indentAmt] = indentString;
>this.indentStrings : Symbol(PrintContext.indentStrings, Decl(parserRealSource5.ts, 9, 30))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>indentStrings : Symbol(PrintContext.indentStrings, Decl(parserRealSource5.ts, 9, 30))
>this.indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>indentAmt : Symbol(PrintContext.indentAmt, Decl(parserRealSource5.ts, 10, 44))
>indentString : Symbol(indentString, Decl(parserRealSource5.ts, 28, 15))
            }
            this.builder += indentString;
>this.builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>indentString : Symbol(indentString, Decl(parserRealSource5.ts, 28, 15))
        }

        public write(s) {
>write : Symbol(PrintContext.write, Decl(parserRealSource5.ts, 37, 9))
>s : Symbol(s, Decl(parserRealSource5.ts, 39, 21))

            this.builder += s;
>this.builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>s : Symbol(s, Decl(parserRealSource5.ts, 39, 21))
        }

        public writeLine(s) {
>writeLine : Symbol(PrintContext.writeLine, Decl(parserRealSource5.ts, 41, 9))
>s : Symbol(s, Decl(parserRealSource5.ts, 43, 25))

            this.builder += s;
>this.builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>s : Symbol(s, Decl(parserRealSource5.ts, 43, 25))

            this.outfile.WriteLine(this.builder);
>this.outfile.WriteLine : Symbol(ITextWriter.WriteLine, Decl(lib.scripthost.d.ts, --, --))
>this.outfile : Symbol(PrintContext.outfile, Decl(parserRealSource5.ts, 13, 21))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>outfile : Symbol(PrintContext.outfile, Decl(parserRealSource5.ts, 13, 21))
>WriteLine : Symbol(ITextWriter.WriteLine, Decl(lib.scripthost.d.ts, --, --))
>this.builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))

            this.builder = "";
>this.builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
>this : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>builder : Symbol(PrintContext.builder, Decl(parserRealSource5.ts, 7, 31))
        }

    }

    export function prePrintAST(ast: AST, parent: AST, walker: IAstWalker) {
>prePrintAST : Symbol(prePrintAST, Decl(parserRealSource5.ts, 49, 5))
>ast : Symbol(ast, Decl(parserRealSource5.ts, 51, 32))
>AST : Symbol(AST)
>parent : Symbol(parent, Decl(parserRealSource5.ts, 51, 41))
>AST : Symbol(AST)
>walker : Symbol(walker, Decl(parserRealSource5.ts, 51, 54))
>IAstWalker : Symbol(IAstWalker)

        var pc: PrintContext = <PrintContext>walker.state;
>pc : Symbol(pc, Decl(parserRealSource5.ts, 52, 11))
>PrintContext : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>PrintContext : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>walker : Symbol(walker, Decl(parserRealSource5.ts, 51, 54))

        ast.print(pc);
>ast : Symbol(ast, Decl(parserRealSource5.ts, 51, 32))
>pc : Symbol(pc, Decl(parserRealSource5.ts, 52, 11))

        pc.increaseIndent();
>pc.increaseIndent : Symbol(PrintContext.increaseIndent, Decl(parserRealSource5.ts, 14, 9))
>pc : Symbol(pc, Decl(parserRealSource5.ts, 52, 11))
>increaseIndent : Symbol(PrintContext.increaseIndent, Decl(parserRealSource5.ts, 14, 9))

        return ast;
>ast : Symbol(ast, Decl(parserRealSource5.ts, 51, 32))
    }


    export function postPrintAST(ast: AST, parent: AST, walker: IAstWalker) {
>postPrintAST : Symbol(postPrintAST, Decl(parserRealSource5.ts, 57, 5))
>ast : Symbol(ast, Decl(parserRealSource5.ts, 60, 33))
>AST : Symbol(AST)
>parent : Symbol(parent, Decl(parserRealSource5.ts, 60, 42))
>AST : Symbol(AST)
>walker : Symbol(walker, Decl(parserRealSource5.ts, 60, 55))
>IAstWalker : Symbol(IAstWalker)

        var pc: PrintContext = <PrintContext>walker.state;
>pc : Symbol(pc, Decl(parserRealSource5.ts, 61, 11))
>PrintContext : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>PrintContext : Symbol(PrintContext, Decl(parserRealSource5.ts, 5, 19))
>walker : Symbol(walker, Decl(parserRealSource5.ts, 60, 55))

        pc.decreaseIndent();
>pc.decreaseIndent : Symbol(PrintContext.decreaseIndent, Decl(parserRealSource5.ts, 18, 9))
>pc : Symbol(pc, Decl(parserRealSource5.ts, 61, 11))
>decreaseIndent : Symbol(PrintContext.decreaseIndent, Decl(parserRealSource5.ts, 18, 9))

        return ast;
>ast : Symbol(ast, Decl(parserRealSource5.ts, 60, 33))
    }
}