From 4efeaef41e57b25d6004e7f91828f7d5b5cd0b20 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 1 Dec 2016 09:51:06 -0700 Subject: Forgot assignment and negation. They both work now. That was actually really cool. Now to clean up the debugging code and write the execution engine. --- src/token.h | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) (limited to 'src/token.h') diff --git a/src/token.h b/src/token.h index 072a96b..4ad1136 100644 --- a/src/token.h +++ b/src/token.h @@ -13,26 +13,34 @@ class Token public: enum Type { - tNumber, - tVariable, - tCommand, - tPlus, - tMinus, - tDivide, - tMultiply, - tModulus, - tOpenParen, - tCloseParen, - tEquals, - tString, - - tNegate, - tEndOfLine, - - tEndOfInput, - - tUninitialized, - tComputedValue + tNumber = 0x1001, + tVariable = 0x2002, + tCommand = 0x2003, + tPlus = 0x4004, + tMinus = 0x4005, + tDivide = 0x4006, + tMultiply = 0x4007, + tModulus = 0x4008, + tOpenParen = 0x8009, + tCloseParen = 0x800a, + tEquals = 0x400b, + tString = 0x200c, + + tNegate = 0x800d, + tEndOfLine = 0x010e, + + tEndOfInput = 0x010f, + + tUninitialized = 0x0110, + tComputedValue = 0x0111, + + + mMetaNumber = 0x1000, + mMetaString = 0x2000, + mMetaOperator = 0x4000, + mMetaAltOp = 0x8000, + mMetaMeta = 0x0100, + }; Token(); -- cgit v1.2.3