]> git.sur5r.net Git - cc65/commitdiff
Added new .VERSION constant
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 12 Aug 2003 15:11:55 +0000 (15:11 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 12 Aug 2003 15:11:55 +0000 (15:11 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2280 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/expr.c
src/ca65/pseudo.c
src/ca65/scanner.c
src/ca65/scanner.h

index f55dc5d56dc8dd30ad8f7a95a90670e54b5cf42c..7b352e3347640ba819b661cbb5aa35809b3816a7 100644 (file)
@@ -41,6 +41,7 @@
 #include "exprdefs.h"
 #include "print.h"
 #include "tgttrans.h"
+#include "version.h"
 #include "xmalloc.h"
 
 /* ca65 */
@@ -666,6 +667,12 @@ static ExprNode* Factor (void)
            NextTok ();
            break;
 
+        case TOK_VERSION:
+            N = GenLiteralExpr (VERSION);
+            NextTok ();
+            break;
+
+
        case TOK_XMATCH:
            N = Function (FuncXMatch);
            break;
index e0fbea17a6877bf891450895821c542a1801b5be..8dac9820cc3711252a381c32e775665c58be0bb5 100644 (file)
@@ -1591,6 +1591,7 @@ static CtrlDesc CtrlCmdTab [] = {
     { ccNone,          DoSunPlus       },
     { ccNone,          DoUnexpected    },      /* .TCOUNT */
     { ccNone,                  DoUnexpected    },      /* .TIME */
+    { ccNone,           DoUnexpected    },      /* .VERSION */
     { ccNone,          DoWarning       },
     { ccNone,          DoWord          },
     { ccNone,                  DoUnexpected    },      /* .XMATCH */
index 4321316791af9d5e48b8374ae9bf40480acbe50b..12c92c86fc8274801bcd394677725c5a87fb8918 100644 (file)
@@ -236,6 +236,7 @@ struct DotKeyword {
     { ".SUNPLUS",      TOK_SUNPLUS     },
     { ".TCOUNT",       TOK_TCOUNT      },
     { ".TIME",                 TOK_TIME        },
+    { ".VERSION",       TOK_VERSION     },
     { ".WARNING",      TOK_WARNING     },
     { ".WORD",                 TOK_WORD        },
     { ".XMATCH",       TOK_XMATCH      },
index 93e11b7e55ac79bd29e2344eecc8056f99262da5..1ac9ff69b6b13fe318d0ea7df7725c0ff2b26bf7 100644 (file)
@@ -214,6 +214,7 @@ enum Token {
     TOK_SUNPLUS,
     TOK_TCOUNT,
     TOK_TIME,
+    TOK_VERSION,
     TOK_WARNING,
     TOK_WORD,
     TOK_XMATCH,