NPLMono.NPLLex.luaX_syntaxerror C# (CSharp) Method

luaX_syntaxerror() public static method

public static luaX_syntaxerror ( LexState ls, string msg ) : void
ls LexState
msg string
return void
        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);
        }