view lexer/Keyword.d @ 22:e331e4e816e4

now handling structs to some extend
author johnsen@johnsen-laptop
date Fri, 18 Apr 2008 23:45:45 +0200
parents 6282db07115f
children ce17bea8e9bd
line wrap: on
line source

module lexer.Keyword;

import lexer.Token;

Tok[char[]] keywords;

static this ()
{
    keywords =
    [
        "byte"[]    : Tok.Byte,
        "ubyte"     : Tok.Ubyte,
        "short"     : Tok.Short,
        "ushort"    : Tok.Ushort,
        "int"       : Tok.Int,
        "uint"      : Tok.Uint,
        "long"      : Tok.Long,
        "ulong"     : Tok.Ulong,

        "bool"      : Tok.Bool,

        "float"     : Tok.Float,
        "double"    : Tok.Double,

        "if"        : Tok.If,
        "else"      : Tok.Else,
        "while"     : Tok.While,
        "return"    : Tok.Return,
        "struct"    : Tok.Struct
    ];
}