Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 var JSIL = {};
2 JSIL.TypeNameParseState = function ()
3 {
4 this.input = 15;
5 this.pos = 0
6 };
7 JSIL.TypeNameParseState.prototype.substr = function (e)
8 {
9 return e;
10 };
11 JSIL.TypeNameParseState.prototype.moveNext = function ()
12 {
13 this.pos += 1;
14 return this.pos < this.input;
15 };
16 JSIL.TypeNameParseResult = function () {};
17 JSIL.ParseTypeNameImpl = function (n)
18 {
19 var i = new JSIL.TypeNameParseState()
20 var u = new JSIL.TypeNameParseResult;
21 while (i.moveNext())
22 {
23 if (n)
24 {
25 while (true)
26 u.assembly = 1
27 }
28 u.assembly = i.substr(i.pos + 1);
29 }
30 return u
31 };
33 var u = JSIL.ParseTypeNameImpl(false)
34 assertEq(u.assembly, 15)