00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020 #ifndef SHTOKEN_HPP
00021 #define SHTOKEN_HPP
00022
00023 #include <vector>
00024 #include "ShDllExport.hpp"
00025 #include "ShRefCount.hpp"
00026 #include "ShBlock.hpp"
00027
00028 namespace SH {
00029
00030 struct ShTokenArgument;
00031
00036 enum ShTokenType {
00037 SH_TOKEN_IF,
00038 SH_TOKEN_ELSE,
00039 SH_TOKEN_ENDIF,
00040 SH_TOKEN_WHILE,
00041 SH_TOKEN_ENDWHILE,
00042 SH_TOKEN_DO,
00043 SH_TOKEN_UNTIL,
00044 SH_TOKEN_FOR,
00045 SH_TOKEN_ENDFOR,
00046 SH_TOKEN_BREAK,
00047 SH_TOKEN_CONTINUE,
00048 SH_TOKEN_STARTSEC,
00049 SH_TOKEN_ENDSEC,
00050 SH_TOKEN_STARTSWITCH,
00051 SH_TOKEN_ENDSWITCH,
00052 SH_TOKEN_CASE
00053 };
00054
00060 class
00061 SH_DLLEXPORT ShToken : public ShBlock {
00062 public:
00063 ShToken(ShTokenType type);
00064 ~ShToken();
00065
00067 ShTokenType type();
00068
00069 void print(std::ostream& out, int indent) const;
00070
00072 std::vector<ShTokenArgument> arguments;
00073
00074 private:
00075 ShTokenType m_type;
00076 };
00077
00078 typedef ShPointer<ShToken> ShTokenPtr;
00079 typedef ShPointer<const ShToken> ShTokenCPtr;
00080
00081
00082 }
00083
00084 #endif