From fcfaaee3a95eef582a324b67f481a4553951c729 Mon Sep 17 00:00:00 2001 From: cuz Date: Tue, 12 Aug 2003 15:11:55 +0000 Subject: [PATCH] Added new .VERSION constant git-svn-id: svn://svn.cc65.org/cc65/trunk@2280 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/expr.c | 7 +++++++ src/ca65/pseudo.c | 1 + src/ca65/scanner.c | 1 + src/ca65/scanner.h | 1 + 4 files changed, 10 insertions(+) diff --git a/src/ca65/expr.c b/src/ca65/expr.c index f55dc5d56..7b352e334 100644 --- a/src/ca65/expr.c +++ b/src/ca65/expr.c @@ -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; diff --git a/src/ca65/pseudo.c b/src/ca65/pseudo.c index e0fbea17a..8dac9820c 100644 --- a/src/ca65/pseudo.c +++ b/src/ca65/pseudo.c @@ -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 */ diff --git a/src/ca65/scanner.c b/src/ca65/scanner.c index 432131679..12c92c86f 100644 --- a/src/ca65/scanner.c +++ b/src/ca65/scanner.c @@ -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 }, diff --git a/src/ca65/scanner.h b/src/ca65/scanner.h index 93e11b7e5..1ac9ff69b 100644 --- a/src/ca65/scanner.h +++ b/src/ca65/scanner.h @@ -214,6 +214,7 @@ enum Token { TOK_SUNPLUS, TOK_TCOUNT, TOK_TIME, + TOK_VERSION, TOK_WARNING, TOK_WORD, TOK_XMATCH, -- 2.39.5