1
0
Files
otyaSMILEBASIC/SMILEBASIC/token.d
2015-07-12 12:00:27 +09:00

75 lines
924 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,
Break,
Continue,
Var,
LBracket,//[
RBracket,//]
Def,
Out,
While,
Wend,
}
struct Token
{
TokenType type;
Value value;
this(TokenType t, Value v)
{
type = t;
value = v;
}
this(TokenType t)
{
type = t;
}
}