michael@0: var JSIL = {}; michael@0: JSIL.TypeNameParseState = function () michael@0: { michael@0: this.input = 15; michael@0: this.pos = 0 michael@0: }; michael@0: JSIL.TypeNameParseState.prototype.substr = function (e) michael@0: { michael@0: return e; michael@0: }; michael@0: JSIL.TypeNameParseState.prototype.moveNext = function () michael@0: { michael@0: this.pos += 1; michael@0: return this.pos < this.input; michael@0: }; michael@0: JSIL.TypeNameParseResult = function () {}; michael@0: JSIL.ParseTypeNameImpl = function (n) michael@0: { michael@0: var i = new JSIL.TypeNameParseState() michael@0: var u = new JSIL.TypeNameParseResult; michael@0: while (i.moveNext()) michael@0: { michael@0: if (n) michael@0: { michael@0: while (true) michael@0: u.assembly = 1 michael@0: } michael@0: u.assembly = i.substr(i.pos + 1); michael@0: } michael@0: return u michael@0: }; michael@0: michael@0: var u = JSIL.ParseTypeNameImpl(false) michael@0: assertEq(u.assembly, 15)