Grantlee  0.4.0
templates/lib/token.h
00001 /*
00002   This file is part of the Grantlee template system.
00003 
00004   Copyright (c) 2009,2010 Stephen Kelly <steveire@gmail.com>
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Lesser General Public
00008   License as published by the Free Software Foundation; either version
00009   2.1 of the Licence, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014   Lesser General Public License for more details.
00015 
00016   You should have received a copy of the GNU Lesser General Public
00017   License along with this library.  If not, see <http://www.gnu.org/licenses/>.
00018 
00019 */
00020 
00021 #ifndef GRANTLEE_TOKEN_H
00022 #define GRANTLEE_TOKEN_H
00023 
00024 #include <QtCore/QString>
00025 
00026 namespace Grantlee
00027 {
00028 
00034 enum TokenType {
00035   TextToken,       
00036   VariableToken,   
00037   BlockToken,      
00038   CommentToken     
00039 };
00040 
00042 
00048 struct Token {
00049   int tokenType;    
00050   int linenumber;   
00051   QString content;  
00052 };
00053 
00054 }
00055 
00056 Q_DECLARE_TYPEINFO( Grantlee::Token, Q_MOVABLE_TYPE );
00057 
00058 #endif
00059