diff dmd/TOK.d @ 0:10317f0c89a5

Initial commit
author korDen
date Sat, 24 Oct 2009 08:42:06 +0400
parents
children ef02e2e203c2
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dmd/TOK.d	Sat Oct 24 08:42:06 2009 +0400
@@ -0,0 +1,251 @@
+module dmd.TOK;
+
+version (DMDV2) {	
+	enum TOK
+	{
+		TOKreserved,
+
+		// Other
+		TOKlparen,	TOKrparen,
+		TOKlbracket,	TOKrbracket,
+		TOKlcurly,	TOKrcurly,
+		TOKcolon,	TOKneg,
+		TOKsemicolon,	TOKdotdotdot,
+		TOKeof,		TOKcast,
+		TOKnull,	TOKassert,
+		TOKtrue,	TOKfalse,
+		TOKarray,	TOKcall,
+		TOKaddress,
+		TOKtype,	TOKthrow,
+		TOKnew,		TOKdelete,
+		TOKstar,	TOKsymoff,
+		TOKvar,		TOKdotvar,
+		TOKdotti,	TOKdotexp,
+		TOKdottype,	TOKslice,
+		TOKarraylength,	TOKversion,
+		TOKmodule,	TOKdollar,
+		TOKtemplate,	TOKdottd,
+		TOKdeclaration,	TOKtypeof,
+		TOKpragma,	TOKdsymbol,
+		TOKtypeid,	TOKuadd,
+		TOKremove,
+		TOKnewanonclass, TOKcomment,
+		TOKarrayliteral, TOKassocarrayliteral,
+		TOKstructliteral,
+
+		// Operators
+		TOKlt,		TOKgt,
+		TOKle,		TOKge,
+		TOKequal,	TOKnotequal,
+		TOKidentity,	TOKnotidentity,
+		TOKindex,	TOKis,
+		TOKtobool,
+
+	// 60
+		// NCEG floating point compares
+		// !<>=     <>    <>=    !>     !>=   !<     !<=   !<>
+		TOKunord,TOKlg,TOKleg,TOKule,TOKul,TOKuge,TOKug,TOKue,
+
+		TOKshl,		TOKshr,
+		TOKshlass,	TOKshrass,
+		TOKushr,	TOKushrass,
+		TOKcat,		TOKcatass,	// ~ ~=
+		TOKadd,		TOKmin,		TOKaddass,	TOKminass,
+		TOKmul,		TOKdiv,		TOKmod,
+		TOKmulass,	TOKdivass,	TOKmodass,
+		TOKand,		TOKor,		TOKxor,
+		TOKandass,	TOKorass,	TOKxorass,
+		TOKassign,	TOKnot,		TOKtilde,
+		TOKplusplus,	TOKminusminus,	TOKconstruct,	TOKblit,
+		TOKdot,		TOKarrow,	TOKcomma,
+		TOKquestion,	TOKandand,	TOKoror,
+
+	// 104
+		// Numeric literals
+		TOKint32v, TOKuns32v,
+		TOKint64v, TOKuns64v,
+		TOKfloat32v, TOKfloat64v, TOKfloat80v,
+		TOKimaginary32v, TOKimaginary64v, TOKimaginary80v,
+
+		// Char constants
+		TOKcharv, TOKwcharv, TOKdcharv,
+
+		// Leaf operators
+		TOKidentifier,	TOKstring,
+		TOKthis,	TOKsuper,
+		TOKhalt,	TOKtuple,
+
+		// Basic types
+		TOKvoid,
+		TOKint8, TOKuns8,
+		TOKint16, TOKuns16,
+		TOKint32, TOKuns32,
+		TOKint64, TOKuns64,
+		TOKfloat32, TOKfloat64, TOKfloat80,
+		TOKimaginary32, TOKimaginary64, TOKimaginary80,
+		TOKcomplex32, TOKcomplex64, TOKcomplex80,
+		TOKchar, TOKwchar, TOKdchar, TOKbit, TOKbool,
+		TOKcent, TOKucent,
+
+		// Aggregates
+		TOKstruct, TOKclass, TOKinterface, TOKunion, TOKenum, TOKimport,
+		TOKtypedef, TOKalias, TOKoverride, TOKdelegate, TOKfunction,
+		TOKmixin,
+
+		TOKalign, TOKextern, TOKprivate, TOKprotected, TOKpublic, TOKexport,
+		TOKstatic, /*TOKvirtual,*/ TOKfinal, TOKconst, TOKabstract, TOKvolatile,
+		TOKdebug, TOKdeprecated, TOKin, TOKout, TOKinout, TOKlazy,
+		TOKauto, TOKpackage, TOKmanifest, TOKimmutable,
+
+		// Statements
+		TOKif, TOKelse, TOKwhile, TOKfor, TOKdo, TOKswitch,
+		TOKcase, TOKdefault, TOKbreak, TOKcontinue, TOKwith,
+		TOKsynchronized, TOKreturn, TOKgoto, TOKtry, TOKcatch, TOKfinally,
+		TOKasm, TOKforeach, TOKforeach_reverse,
+		TOKscope,
+		TOKon_scope_exit, TOKon_scope_failure, TOKon_scope_success,
+
+		// Contracts
+		TOKbody, TOKinvariant,
+
+		// Testing
+		TOKunittest,
+
+		// Added after 1.0
+		TOKref,
+		TOKmacro,
+
+		TOKtraits,
+		TOKoverloadset,
+		TOKpure,
+		TOKnothrow,
+		TOKtls,
+		TOKgshared,
+		TOKline,
+		TOKfile,
+		TOKshared,
+		TOKat,
+
+		TOKMAX
+	}
+} else {
+	enum TOK
+	{
+		TOKreserved,
+
+		// Other
+		TOKlparen,	TOKrparen,
+		TOKlbracket,	TOKrbracket,
+		TOKlcurly,	TOKrcurly,
+		TOKcolon,	TOKneg,
+		TOKsemicolon,	TOKdotdotdot,
+		TOKeof,		TOKcast,
+		TOKnull,	TOKassert,
+		TOKtrue,	TOKfalse,
+		TOKarray,	TOKcall,
+		TOKaddress,
+		TOKtype,	TOKthrow,
+		TOKnew,		TOKdelete,
+		TOKstar,	TOKsymoff,
+		TOKvar,		TOKdotvar,
+		TOKdotti,	TOKdotexp,
+		TOKdottype,	TOKslice,
+		TOKarraylength,	TOKversion,
+		TOKmodule,	TOKdollar,
+		TOKtemplate,	TOKdottd,
+		TOKdeclaration,	TOKtypeof,
+		TOKpragma,	TOKdsymbol,
+		TOKtypeid,	TOKuadd,
+		TOKremove,
+		TOKnewanonclass, TOKcomment,
+		TOKarrayliteral, TOKassocarrayliteral,
+		TOKstructliteral,
+
+		// Operators
+		TOKlt,		TOKgt,
+		TOKle,		TOKge,
+		TOKequal,	TOKnotequal,
+		TOKidentity,	TOKnotidentity,
+		TOKindex,	TOKis,
+		TOKtobool,
+
+	// 60
+		// NCEG floating point compares
+		// !<>=     <>    <>=    !>     !>=   !<     !<=   !<>
+		TOKunord,TOKlg,TOKleg,TOKule,TOKul,TOKuge,TOKug,TOKue,
+
+		TOKshl,		TOKshr,
+		TOKshlass,	TOKshrass,
+		TOKushr,	TOKushrass,
+		TOKcat,		TOKcatass,	// ~ ~=
+		TOKadd,		TOKmin,		TOKaddass,	TOKminass,
+		TOKmul,		TOKdiv,		TOKmod,
+		TOKmulass,	TOKdivass,	TOKmodass,
+		TOKand,		TOKor,		TOKxor,
+		TOKandass,	TOKorass,	TOKxorass,
+		TOKassign,	TOKnot,		TOKtilde,
+		TOKplusplus,	TOKminusminus,	TOKconstruct,	TOKblit,
+		TOKdot,		TOKarrow,	TOKcomma,
+		TOKquestion,	TOKandand,	TOKoror,
+
+	// 104
+		// Numeric literals
+		TOKint32v, TOKuns32v,
+		TOKint64v, TOKuns64v,
+		TOKfloat32v, TOKfloat64v, TOKfloat80v,
+		TOKimaginary32v, TOKimaginary64v, TOKimaginary80v,
+
+		// Char constants
+		TOKcharv, TOKwcharv, TOKdcharv,
+
+		// Leaf operators
+		TOKidentifier,	TOKstring,
+		TOKthis,	TOKsuper,
+		TOKhalt,	TOKtuple,
+
+		// Basic types
+		TOKvoid,
+		TOKint8, TOKuns8,
+		TOKint16, TOKuns16,
+		TOKint32, TOKuns32,
+		TOKint64, TOKuns64,
+		TOKfloat32, TOKfloat64, TOKfloat80,
+		TOKimaginary32, TOKimaginary64, TOKimaginary80,
+		TOKcomplex32, TOKcomplex64, TOKcomplex80,
+		TOKchar, TOKwchar, TOKdchar, TOKbit, TOKbool,
+		TOKcent, TOKucent,
+
+		// Aggregates
+		TOKstruct, TOKclass, TOKinterface, TOKunion, TOKenum, TOKimport,
+		TOKtypedef, TOKalias, TOKoverride, TOKdelegate, TOKfunction,
+		TOKmixin,
+
+		TOKalign, TOKextern, TOKprivate, TOKprotected, TOKpublic, TOKexport,
+		TOKstatic, /*TOKvirtual,*/ TOKfinal, TOKconst, TOKabstract, TOKvolatile,
+		TOKdebug, TOKdeprecated, TOKin, TOKout, TOKinout, TOKlazy,
+		TOKauto, TOKpackage, TOKmanifest, TOKimmutable,
+
+		// Statements
+		TOKif, TOKelse, TOKwhile, TOKfor, TOKdo, TOKswitch,
+		TOKcase, TOKdefault, TOKbreak, TOKcontinue, TOKwith,
+		TOKsynchronized, TOKreturn, TOKgoto, TOKtry, TOKcatch, TOKfinally,
+		TOKasm, TOKforeach, TOKforeach_reverse,
+		TOKscope,
+		TOKon_scope_exit, TOKon_scope_failure, TOKon_scope_success,
+
+		// Contracts
+		TOKbody, TOKinvariant,
+
+		// Testing
+		TOKunittest,
+
+		// Added after 1.0
+		TOKref,
+		TOKmacro,
+
+		TOKMAX
+	}
+}
+
+import dmd.EnumUtils;
+mixin(BringToCurrentScope!(TOK));
\ No newline at end of file