2016-10-21 12:18:31 +00:00
|
|
|
// Name Token used in the code generator
|
|
|
|
xx(Nil, TK_None)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(ID, TK_Identifier)
|
|
|
|
xx(Super, TK_Super)
|
|
|
|
xx(Null, TK_Null)
|
|
|
|
xx(ConstValue, TK_Const)
|
|
|
|
xx(FuncCall, '(')
|
|
|
|
xx(ArrayAccess, TK_Array)
|
|
|
|
xx(MemberAccess, '.')
|
2016-11-17 19:31:53 +00:00
|
|
|
xx(ClassCast, TK_Class)
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(TypeRef, TK_Class)
|
2016-10-27 23:14:21 +00:00
|
|
|
xx(Vector, TK_Vector2)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(PostInc, TK_Incr)
|
|
|
|
xx(PostDec, TK_Decr)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(PreInc, TK_Incr)
|
|
|
|
xx(PreDec, TK_Decr)
|
|
|
|
xx(Negate, '-')
|
|
|
|
xx(AntiNegate, '+')
|
|
|
|
xx(BitNot, '~')
|
|
|
|
xx(BoolNot, '!')
|
|
|
|
xx(SizeOf, TK_SizeOf)
|
|
|
|
xx(AlignOf, TK_AlignOf)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(Add, '+')
|
|
|
|
xx(Sub, '-')
|
|
|
|
xx(Mul, '*')
|
|
|
|
xx(Div, '/')
|
|
|
|
xx(Mod, '%')
|
|
|
|
xx(Pow, TK_MulMul)
|
|
|
|
xx(CrossProduct, TK_Cross)
|
|
|
|
xx(DotProduct, TK_Dot)
|
|
|
|
xx(LeftShift, TK_LShift)
|
|
|
|
xx(RightShift, TK_RShift)
|
|
|
|
xx(URightShift, TK_URShift)
|
|
|
|
xx(Concat, TK_DotDot)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(LT, '<')
|
|
|
|
xx(LTEQ, TK_Leq)
|
|
|
|
xx(GT, '>')
|
|
|
|
xx(GTEQ, TK_Geq)
|
|
|
|
xx(LTGTEQ, TK_LtGtEq)
|
|
|
|
xx(Is, TK_Is)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(EQEQ, TK_Eq)
|
|
|
|
xx(NEQ, TK_Neq)
|
|
|
|
xx(APREQ, TK_ApproxEq)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(BitAnd, '&')
|
|
|
|
xx(BitOr, '|')
|
|
|
|
xx(BitXor, '^')
|
|
|
|
xx(BoolAnd, TK_AndAnd)
|
|
|
|
xx(BoolOr, TK_OrOr)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(Assign, '=')
|
|
|
|
xx(AddAssign, '+') // these are what the code generator needs, not what they represent.
|
|
|
|
xx(SubAssign, '-')
|
|
|
|
xx(MulAssign, '*')
|
|
|
|
xx(DivAssign, '/')
|
|
|
|
xx(ModAssign, '%')
|
|
|
|
xx(LshAssign, TK_LShift)
|
|
|
|
xx(RshAssign, TK_RShift)
|
|
|
|
xx(URshAssign, TK_URShift)
|
|
|
|
xx(AndAssign, '&')
|
|
|
|
xx(OrAssign, '|')
|
|
|
|
xx(XorAssign, '^')
|
2016-10-21 10:22:42 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(Scope, TK_ColonColon)
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(Trinary, '?')
|
2013-11-02 02:28:00 +00:00
|
|
|
|
2016-10-21 12:18:31 +00:00
|
|
|
xx(Cast, TK_Coerce)
|
2013-10-24 04:06:32 +00:00
|
|
|
|
|
|
|
#undef xx
|