
00001 #ifndef _CToken_H_ 00002 #define _CToken_H_ 00003 00004 #include <stdio.h> 00005 #include "EToken.h" 00006 #include "xi-util.h" 00007 #include "sdag-globals.h" 00008 00009 namespace xi { 00010 00011 class CToken { 00012 public: 00013 EToken type; 00014 XStr *text; 00015 CToken(EToken t, const char *txt) 00016 { 00017 type = t; 00018 text = new XStr(txt); 00019 } 00020 ~CToken() 00021 { 00022 // delete text; 00023 } 00024 void print(int indent) 00025 { 00026 Indent(indent); 00027 printf("Token: %d\tText: \"%s\"\n", type, text->charstar()); 00028 } 00029 }; 00030 00031 } 00032 00033 #endif /* _CToken_H_ */
1.5.5