From 5be384da637fa387df292d38ff995178d3656de0 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 17 May 2002 20:25:46 +0000 Subject: [PATCH] create a `SELF' keyword so the global self entity can be handled sanely. Not fully implemented yet. --- tools/qfcc/source/qc-lex.l | 1 + tools/qfcc/source/qc-parse.y | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/qc-lex.l b/tools/qfcc/source/qc-lex.l index de478fc3a..57153fa1a 100644 --- a/tools/qfcc/source/qc-lex.l +++ b/tools/qfcc/source/qc-lex.l @@ -262,6 +262,7 @@ static keyword_t keywords[] = { {"enum", ENUM, 0, 0, PROG_ID_VERSION}, {"typedef", TYPEDEF, 0, 0, PROG_ID_VERSION}, {"super", SUPER, 0, 0, PROG_VERSION}, + {"SELF", SELF, 0, 0, PROG_VERSION}, {"@class", CLASS, 0, 0, PROG_VERSION}, {"@defs", DEFS, 0, 0, PROG_VERSION}, diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index d3c5c4eea..5fc4f17bf 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -113,7 +113,7 @@ void free_local_inits (hashtab_t *def_list); %token LOCAL RETURN WHILE DO IF ELSE FOR BREAK CONTINUE ELLIPSIS NIL %token IFBE IFB IFAE IFA -%token SWITCH CASE DEFAULT STRUCT ENUM TYPEDEF SUPER +%token SWITCH CASE DEFAULT STRUCT ENUM TYPEDEF SUPER SELF %token ELE_START %token TYPE