var i = this.cursor;
while (true) {
- if (i < 0) return false;
+ if (i < 0) {
+ if (n > -1) {
+ i = 0; continue;
+ }
+ }
else if (i > this.tokens.length) return false;
if (i != this.cursor && (this.tokens[i] === undefined || this.tokens[i].is("WHIT") || this.tokens[i].is("COMM"))) {
},
// what about comments after 'function'...
// is this used ???
-
+ nextTok : function() {
+ return this.nextNonSpace();
+ },
nextNonSpace : function ()
{
*/
balance : function(/**String*/start, /**String*/stop) {
- start = typeof(Lang.matching(start)) == 'undefined' : Lang.punc(start) : start;
+ start = typeof(Lang.matching(start)) == 'undefined' ? Lang.punc(start) : start;
if (!stop) stop = Lang.matching(start);
arrayToString : function(ar) {
console.log(typeof(ar));
var ret = [];
- Roo.each(ar, function(e) {
+ ar.forEach(function(e) {
ret.push(e.data);
})
return ret.join('');
+ },
+ dump: function()
+ {
+ this.tokens.forEach(function(t) {
+ print(t.toString());
+ });
}
});
\ No newline at end of file