Lines Matching defs:peek

17 function peek(){return Self.I<Self.N&&Self.L[Self.I]}
21 function comment(){while("%"==peek()){while(peek()&&"\n"!=peek())
23 function text(){xchar();var L=[];var N=1;while(0<N&&peek()){var C=xchar();switch(C){case"(":N++;break;case")":N--;if(N<=0)C=false;break;case"\\":C=xchar();switch(C){case"(":break;case")":break;case"\\":break;case"n":C="\n";break;case"r":C="\r";break;case"t":C="\t";break;default:C=false}
27 function symbol(){var C=xchar();if(member(C,"()<>/% \t\n"))throw new Error("Symbol expected, got "+C);var N=member(C,"+-0123456789.");var F="."==C;var L=[C];while(peek()&&!member(peek(),"()<>[]{}/% \t\n")){C=xchar();L.push(C);if(N&&!member(C,"0123456789")){if(!F&&"."==C)F=true;else N=false}}
29 function token(){skip();switch(peek()){case false:return undefined;case"%":return comment();case"[":return new Symbol(xchar());case"]":return new Symbol(xchar());case"{":Self.D++;return new Symbol(xchar());case"}":Self.D--;return new Symbol(xchar());case"/":xchar();var X=symbol();return quote(X);case"(":return text();case"<":xchar();if("<"!=peek())throw new Error("Encoded strings not implemented yet");xchar();return new Symbol("<<");case">":xchar();if(">"!=peek())throw new Error("Unexpected >");xchar();return new Symbol(">>");default:return symbol()}}
30 PsParser.prototype.init=init;PsParser.prototype.peek=peek;PsParser.prototype.token=token;return this}
36 var PsP=new PsParser;function parse(L){PsP.init(L);while(PsP.peek()){var T=PsP.token();if(T||T===0){Os.push(T);if(PsP.D<=0||isSymbol(T)&&(member(symbolName(T),"[]{}")||"<<"==symbolName(T)||">>"==symbolName(T))){exec();while(0<Es.length)