Cosmos/source2/Compiler/Cosmos.XSharp/Token.cs
kudzu_cp 429b770bc2 X#
2012-06-18 16:02:48 +00:00

29 lines
806 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.Compiler.XSharp {
public enum TokenType {
// Line based
Comment, LiteralAsm
//
, Register, Keyword, AlphaNum
// Values
, ValueInt
// Symbols
// _ and . are AlphaNum. See comments in Parser
, Equals, BracketLeft, BracketRight, Plus, Minus, Colon, Dollar, CurlyLeft, CurlyRight, Comma, LessThan, GreaterThan, Question
//
, WhiteSpace
// For now used during scanning while user is typing, but in future could be user methods we have to find etc
, Unknown
}
public class Token {
public TokenType Type = TokenType.Unknown;
public string Value;
public int SrcPosStart;
public int SrcPosEnd;
}
}