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