src/Messages.h
author David Anderson <dvander@alliedmods.net>
Sun Nov 18 14:56:09 2012 -0800 (2012-11-18)
changeset 213 a9b8d24967d6
parent 86 32ad0523b309
child 263 ba85a47ee414
permissions -rw-r--r--
Fix GCC retardedness.
     1 /*
     2  * Copyright (C) 2012 David Anderson
     3  *
     4  * This file is part of JITCraft.
     5  *
     6  * JITCraft is free software: you can redistribute it and/or modify it under
     7  * the terms of the GNU General Public License as published by the Free
     8  * Software Foundation, either version 3 of the License, or (at your option)
     9  * any later version.
    10  * 
    11  * Foobar is distributed in the hope that it will be useful, but WITHOUT ANY
    12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    14  *
    15  * You should have received a copy of the GNU General Public License along with
    16  * JITCraft. If not, see http://www.gnu.org/licenses/.
    17  */
    18 #ifndef _include_jitcraft_messages_h_
    19 #define _include_jitcraft_messages_h_
    20 
    21 namespace ke {
    22 
    23 enum MessageType
    24 {
    25     MessageType_SyntaxError,
    26     MessageType_TypeError,
    27     MessageType_SystemError
    28 };
    29 
    30 enum Message
    31 {
    32 #define MSG(Name, Type, String)     Message_##Name,
    33 # include "Messages.tbl"
    34 #undef MSG
    35     MessageType_Total
    36 };
    37 
    38 struct MessageInfo
    39 {
    40     MessageType type;
    41     const char *format;
    42 };
    43 
    44 extern const MessageInfo Messages[];
    45 
    46 }
    47 
    48 #endif // _include_jitcraft_messages_h_