Lines Matching refs:token
2238 int token;
2255 static void luaX_lexerror(LexState*ls,const char*msg,int token);
2691 static const char*luaX_token2str(LexState*ls,int token){
2692 if(token<257){
2693 return(iscntrl(token))?luaO_pushfstring(ls->L,"char(%d)",token):
2694 luaO_pushfstring(ls->L,"%c",token);
2697 return luaX_tokens[token-257];
2699 static const char*txtToken(LexState*ls,int token){
2700 switch(token){
2707 return luaX_token2str(ls,token);
2710 static void luaX_lexerror(LexState*ls,const char*msg,int token){
2714 if(token)
2715 luaO_pushfstring(ls->L,"%s near "LUA_QL("%s"),msg,txtToken(ls,token));
2719 luaX_lexerror(ls,msg,ls->t.token);
2742 ls->lookahead.token=TK_EOS;
2986 if(ls->lookahead.token!=TK_EOS){
2988 ls->lookahead.token=TK_EOS;
2991 ls->t.token=llex(ls,&ls->t.seminfo);
2994 ls->lookahead.token=llex(ls,&ls->lookahead.seminfo);
3668 if(ls->t.token==TK_NAME||ls->t.token==TK_STRING){
3673 static void error_expected(LexState*ls,int token){
3675 luaO_pushfstring(ls->L,LUA_QL("%s")" expected",luaX_token2str(ls,token)));
3685 if(ls->t.token==c){
3692 if(ls->t.token!=c)
3960 if(ls->t.token==TK_NAME){
4013 if(ls->t.token=='}')break;
4015 switch(ls->t.token){
4018 if(ls->lookahead.token!='=')
4044 if(ls->t.token!=')'){
4046 switch(ls->t.token){
4096 switch(ls->t.token){
4101 if(ls->t.token==')')
4137 switch(ls->t.token){
4160 switch(ls->t.token){
4190 switch(ls->t.token){
4278 uop=getunopr(ls->t.token);
4285 op=getbinopr(ls->t.token);
4301 static int block_follow(int token){
4302 switch(token){
4503 switch(ls->t.token){
4524 while(ls->t.token==TK_ELSEIF){
4529 if(ls->t.token==TK_ELSE){
4570 while(ls->t.token=='.')
4572 if(ls->t.token==':'){
4603 if(block_follow(ls->t.token)||ls->t.token==';')
4628 switch(ls->t.token){
4681 while(!islast&&!block_follow(ls->t.token)){