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 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
|
=== tests/cases/conformance/parser/ecmascript5/parserSyntaxWalker.generated.ts ===
//declare module "fs" {
No type information for this code.// export class File {
No type information for this code.// constructor(filename: string);
No type information for this code.// public ReadAllText(): string;
No type information for this code.// }
No type information for this code.// export interface IFile {
No type information for this code.// [index: number]: string;
No type information for this code.// }
No type information for this code.//}
No type information for this code.
No type information for this code.//import fs = module("fs");
No type information for this code.
No type information for this code.
No type information for this code.//module TypeScriptAllInOne {
No type information for this code.// export class Program {
No type information for this code.// static Main(...args: string[]) {
No type information for this code.// try {
No type information for this code.// var bfs = new BasicFeatures();
No type information for this code.// var retValue: number = 0;
No type information for this code.
No type information for this code.// retValue = bfs.VARIABLES();
No type information for this code.// if (retValue != 0) {
No type information for this code.
No type information for this code.// return 1;
No type information for this code.// }
No type information for this code.
No type information for this code.// retValue = bfs.STATEMENTS(4);
No type information for this code.// if (retValue != 0) {
No type information for this code.
No type information for this code.// return 1;
No type information for this code.// }
No type information for this code.
No type information for this code.
No type information for this code.// retValue = bfs.TYPES();
No type information for this code.// if (retValue != 0) {
No type information for this code.
No type information for this code.// return 1;
No type information for this code.// }
No type information for this code.
No type information for this code.// retValue = bfs.OPERATOR();
No type information for this code.// if (retValue != 0) {
No type information for this code.
No type information for this code.// return 1;
No type information for this code.// }
No type information for this code.// }
No type information for this code.// catch (e) {
No type information for this code.// console.log(e);
No type information for this code.// }
No type information for this code.// finally {
No type information for this code.
No type information for this code.// }
No type information for this code.
No type information for this code.// console.log('Done');
No type information for this code.
No type information for this code.// return 0;
No type information for this code.
No type information for this code.// }
No type information for this code.// }
No type information for this code.
No type information for this code.// class BasicFeatures {
No type information for this code.// /// <summary>
No type information for this code.// /// Test various of variables. Including nullable,key world as variable,special format
No type information for this code.// /// </summary>
No type information for this code.// /// <returns></returns>
No type information for this code.// public VARIABLES(): number {
No type information for this code.// var local = Number.MAX_VALUE;
No type information for this code.// var min = Number.MIN_VALUE;
No type information for this code.// var inf = Number.NEGATIVE_INFINITY;
No type information for this code.// var nan = Number.NaN;
No type information for this code.// var undef = undefined;
No type information for this code.
No type information for this code.// var п = local;
No type information for this code.// var м = local;
No type information for this code.
No type information for this code.// var local5 = <fs.File>null;
No type information for this code.// var local6 = local5 instanceof fs.File;
No type information for this code.
No type information for this code.// var hex = 0xBADC0DE, Hex = 0XDEADBEEF;
No type information for this code.// var float = 6.02e23, float2 = 6.02E-23
No type information for this code.// var char = 'c', \u0066 = '\u0066', hexchar = '\x42';
No type information for this code.// var quoted = '"', quoted2 = "'";
No type information for this code.// var reg = /\w*/;
No type information for this code.// var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, toString: () => 'objLit{42}' };
No type information for this code.// var weekday = Weekdays.Monday;
No type information for this code.
No type information for this code.// var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday;
No type information for this code.
No type information for this code.// //
No type information for this code.// var any = 0;
No type information for this code.// var boolean = 0;
No type information for this code.// var declare = 0;
No type information for this code.// var constructor = 0;
No type information for this code.// var get = 0;
No type information for this code.// var implements = 0;
No type information for this code.// var interface = 0;
No type information for this code.// var let = 0;
No type information for this code.// var module = 0;
No type information for this code.// var number = 0;
No type information for this code.// var package = 0;
No type information for this code.// var private = 0;
No type information for this code.// var protected = 0;
No type information for this code.// var public = 0;
No type information for this code.// var set = 0;
No type information for this code.// var static = 0;
No type information for this code.// var string = 0;
No type information for this code.// var yield = 0;
No type information for this code.
No type information for this code.// var sum3 = any + boolean + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield;
No type information for this code.
No type information for this code.// return 0;
No type information for this code.// }
No type information for this code.
No type information for this code.// /// <summary>
No type information for this code.// /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally
No type information for this code.// /// </summary>
No type information for this code.// /// <param name="i"></param>
No type information for this code.// /// <returns></returns>
No type information for this code.// STATEMENTS(i: number): number {
No type information for this code.// var retVal = 0;
No type information for this code.// if (i == 1)
No type information for this code.// retVal = 1;
No type information for this code.// else
No type information for this code.// retVal = 0;
No type information for this code.// switch (i) {
No type information for this code.// case 2:
No type information for this code.// retVal = 1;
No type information for this code.// break;
No type information for this code.// case 3:
No type information for this code.// retVal = 1;
No type information for this code.// break;
No type information for this code.// default:
No type information for this code.// break;
No type information for this code.// }
No type information for this code.
No type information for this code.// for (var x in { x: 0, y: 1 }) {
No type information for this code.// }
No type information for this code.
No type information for this code.// try {
No type information for this code.// throw null;
No type information for this code.// }
No type information for this code.// catch (Exception) {
No type information for this code.// }
No type information for this code.// finally {
No type information for this code.// try { }
No type information for this code.// catch (Exception) { }
No type information for this code.// }
No type information for this code.
No type information for this code.// return retVal;
No type information for this code.// }
No type information for this code.
No type information for this code.// /// <summary>
No type information for this code.// /// Test types in ts language. Including class,struct,interface,delegate,anonymous type
No type information for this code.// /// </summary>
No type information for this code.// /// <returns></returns>
No type information for this code.// public TYPES(): number {
No type information for this code.// var retVal = 0;
No type information for this code.// var c = new CLASS();
No type information for this code.// var xx: IF = c;
No type information for this code.// retVal += c.Property;
No type information for this code.// retVal += c.Member();
No type information for this code.// retVal += xx ^= Foo() ? 0 : 1;
No type information for this code.
No type information for this code.// //anonymous type
No type information for this code.// var anony = { a: new CLASS() };
No type information for this code.
No type information for this code.// retVal += anony.a.d();
No type information for this code.
No type information for this code.// return retVal;
No type information for this code.// }
No type information for this code.
No type information for this code.
No type information for this code.// ///// <summary>
No type information for this code.// ///// Test different operators
No type information for this code.// ///// </summary>
No type information for this code.// ///// <returns></returns>
No type information for this code.// public OPERATOR(): number {
No type information for this code.// var a: number[] = [1, 2, 3, 4, implements , ];/*[] bug*/ // YES []
No type information for this code.// var i = a[1];/*[]*/
No type information for this code.// i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/
No type information for this code.// var b = true && false || true ^ false;/*& | ^*/
No type information for this code.// b = !b;/*!*/
No type information for this code.// i = ~i;/*~i*/
No type information for this code.// b = i < (i - continue ) && (i + 1) > i;/*< && >*/
No type information for this code.// var f = true ? 1 : 0;/*? :*/ // YES :
No type information for this code.// i++;/*++*/
No type information for this code.// i--;/*--*/
No type information for this code.// b = true && false || true;/*&& ||*/
No type information for this code.// i = i << 5;/*<<*/
No type information for this code.// i = i >> 5;/*>>*/
No type information for this code.// var j = i;
No type information for this code.// b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/
No type information for this code.// i += <number>5.0;/*+=*/
No type information for this code.// i -= i;/*-=*/
No type information for this code.// i *= i;/**=*/
No type information for this code.// if (i == 0)
No type information for this code.// i++;
No type information for this code.// i /= i;/*/=*/
No type information for this code.// i %= i;/*%=*/
No type information for this code.// i &= i;/*&=*/
No type information for this code.// i |= i;/*|=*/
No type information for this code.// i ^= i;/*^=*/
No type information for this code.// i <<= i;/*<<=*/
No type information for this code.// i >>= i;/*>>=*/
No type information for this code.
No type information for this code.// if (i == 0 && !b && f == 1)
No type information for this code.// return 0;
No type information for this code.// else return 1;
No type information for this code.// }
No type information for this code.
No type information for this code.// }
No type information for this code.
No type information for this code.// interface IF {
No type information for this code.// Foo <!-- ): boolean;
No type information for this code.// }
No type information for this code.
No type information for this code.// class CLASS implements IF {
No type information for this code.
No type information for this code.// public d = () => ' return 0; };
No type information for this code.// public get Property() { return 0; }
No type information for this code.// public Member() {
No type information for this code.// return 0;
No type information for this code.// }
No type information for this code.// public Foo(): boolean {
No type information for this code.// var myEvent = () => { return 1; };
No type information for this code.// if (myEvent() == 1)
No type information for this code.// return true;
No type information for this code.// else
No type information for this code.// return false;
No type information for this code.// }
No type information for this code.// }
No type information for this code.
No type information for this code.
No type information for this code.// // todo: use these
No type information for this code.// class A {
No type information for this code.// public method1(val:number) {
No type information for this code.// return val;
No type information for this code.// }
No type information for this code.// public method2() {
No type information for this code.// return 2 * this.method1(2);
No type information for this code.// }
No type information for this code.// }
No type information for this code.
No type information for this code.// class B extends A {
No type information for this code.
No type information for this code.// public method2() {
No type information for this code.// return this.method1(2);
No type information for this code.// }
No type information for this code.// }
No type information for this code.
No type information for this code.// class Overloading {
No type information for this code.
No type information for this code.// private otherValue = 42;
No type information for this code.
No type information for this code.// constructor(private value: number, public name: string) { }
No type information for this code.
No type information for this code.// public Overloads(value: string);
No type information for this code.// public Overloads(value: string, ...rest: string[]) { }
No type information for this code.
No type information for this code.// public DefaultValue(value?: string = "Hello") { }
No type information for this code.// }
No type information for this code.//}
No type information for this code.
No type information for this code.//enum Weekdays {
No type information for this code.// Monday,
No type information for this code.// Tuesday,
No type information for this code.// Weekend,
No type information for this code.//}
No type information for this code.
No type information for this code.//enum Fruit {
No type information for this code.// Apple,
No type information for this code.// Pear
No type information for this code.//}
No type information for this code.
No type information for this code.//interface IDisposable {
No type information for this code.// Dispose(): void;
No type information for this code.//}
No type information for this code.
No type information for this code.//TypeScriptAllInOne.Program.Main();
No type information for this code.
No type information for this code.
|