view trunk/src/Token.d @ 3:4bbce78bfb1e

- Added TOK enum. - Added two methods to Lexer class.
author aziz
date Thu, 21 Jun 2007 18:36:04 +0000
parents 8ba2570de175
children 92df59b1ec4a
line wrap: on
line source

/++
  Author: Aziz Köksal
  License: GPL2
+/
module Token;

struct Position
{
  size_t loc;
  size_t col;
}

enum TOK
{
  Identifier,
  Whitespace,
  Comment
}

struct Token
{
  TOK type;
  Position pos;

  union
  {
    char[] str;
    float f;
    double d;
  }
}