public static void luaX_syntaxerror(LexState ls, string msg)
{
string lasttoken;
switch (ls.t.token)
{
case (int)RESERVED.TK_NAME:
lasttoken = ls.t.seminfo.ts;
break;
case (int)RESERVED.TK_STRING:
case (int)RESERVED.TK_NUMBER:
lasttoken = new string(ls.buff);
break;
default:
lasttoken = luaX_token2str(ls, ls.t.token);
break;
}
luaX_error(ls, msg, lasttoken);
}