Source-highlight Library
|
00001 // 00002 // C++ Interface: parserinfo 00003 // 00004 // Description: 00005 // 00006 // 00007 // Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2005-2008 00008 // 00009 // Copyright: See COPYING file that comes with this distribution 00010 // 00011 // 00012 #ifndef PARSERINFO_H 00013 #define PARSERINFO_H 00014 00015 #include <string> 00016 00017 namespace srchilite { 00018 00023 struct ParserInfo { 00024 std::string filename; // including path 00025 unsigned int line; 00026 00027 ParserInfo() : 00028 line(0) { 00029 } 00030 ParserInfo(const std::string &n) : 00031 filename(n), line(0) { 00032 } 00033 00034 void setParserInfo(const std::string &name, unsigned int l) { 00035 filename = name; 00036 line = l; 00037 } 00038 00039 void setParserInfo(const ParserInfo *p) { 00040 filename = p->filename; 00041 line = p->line; 00042 } 00043 }; 00044 00045 } 00046 00047 #endif