1
0
Files
otyaSMILEBASIC/SMILEBASIC/token.d
2015-06-07 20:56:34 +09:00

66 lines
817 B
D

module otya.smilebasic.token;
import otya.smilebasic.type;
enum TokenType
{
Unknown,
Integer,
Double,
String,
Plus,
Minus,
Mul,
Div,
Mod,
Or,
And,
Xor,
Not,
Print,
If,
LParen,
RParen,
Iden,
Comma,
Colon,
Semicolon,
NewLine,
Assign,
Label,
Goto,
Then,
Else,
Endif,
For,
Next,
Equal,
NotEqual,
Less,//<
Greater,//>
LessEqual,
GreaterEqual,
LeftShift,//<<
RightShift,//>>
LogicalNot,//!
LogicalAnd,//&&
LogicalOr,//||
IntDiv,//DIV
Gosub,
Return,
End,
}
struct Token
{
TokenType type;
Value value;
this(TokenType t, Value v)
{
type = t;
value = v;
}
this(TokenType t)
{
type = t;
}
}