# HG changeset patch # User Leandro Lucarella # Date 1262801899 10800 # Node ID eae495e6ae8d9fe19c3928246c435348bd2b1dde # Parent a413ae7329bf9621c30837c309c343902655eb5b Merge DMD r248: implement Denis Koroskin's macro suggestion --- dmd/lexer.c | 2 +- dmd/lexer.h | 8 ++++---- dmd/mars.c | 2 +- dmd/parse.c | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff -r a413ae7329bf -r eae495e6ae8d dmd/lexer.c --- a/dmd/lexer.c Wed Jan 06 15:18:19 2010 -0300 +++ b/dmd/lexer.c Wed Jan 06 15:18:19 2010 -0300 @@ -210,7 +210,7 @@ case TOKenum: case TOKstruct: case TOKimport: - CASE_BASIC_TYPES: + case BASIC_TYPES: p = ident->toChars(); break; diff -r a413ae7329bf -r eae495e6ae8d dmd/lexer.h --- a/dmd/lexer.h Wed Jan 06 15:18:19 2010 -0300 +++ b/dmd/lexer.h Wed Jan 06 15:18:19 2010 -0300 @@ -171,8 +171,8 @@ TOKMAX }; -#define CASE_BASIC_TYPES \ - case TOKwchar: case TOKdchar: \ +#define BASIC_TYPES \ + TOKwchar: case TOKdchar: \ case TOKbit: case TOKbool: case TOKchar: \ case TOKint8: case TOKuns8: \ case TOKint16: case TOKuns16: \ @@ -183,8 +183,8 @@ case TOKcomplex32: case TOKcomplex64: case TOKcomplex80: \ case TOKvoid -#define CASE_BASIC_TYPES_X(t) \ - case TOKvoid: t = Type::tvoid; goto LabelX; \ +#define BASIC_TYPES_X(t) \ + TOKvoid: t = Type::tvoid; goto LabelX; \ case TOKint8: t = Type::tint8; goto LabelX; \ case TOKuns8: t = Type::tuns8; goto LabelX; \ case TOKint16: t = Type::tint16; goto LabelX; \ diff -r a413ae7329bf -r eae495e6ae8d dmd/mars.c --- a/dmd/mars.c Wed Jan 06 15:18:19 2010 -0300 +++ b/dmd/mars.c Wed Jan 06 15:18:19 2010 -0300 @@ -58,7 +58,7 @@ copyright = "Copyright (c) 1999-2009 by Digital Mars and Tomas Lindquist Olsen"; written = "written by Walter Bright and Tomas Lindquist Olsen"; - version = "v1.052"; + version = "v1.053"; ldc_version = LDC_REV; llvm_version = LLVM_REV_STR; global.structalign = 8; diff -r a413ae7329bf -r eae495e6ae8d dmd/parse.c --- a/dmd/parse.c Wed Jan 06 15:18:19 2010 -0300 +++ b/dmd/parse.c Wed Jan 06 15:18:19 2010 -0300 @@ -195,7 +195,7 @@ break; } - CASE_BASIC_TYPES: + case BASIC_TYPES: case TOKalias: case TOKtypedef: case TOKidentifier: @@ -1778,7 +1778,7 @@ //printf("parseBasicType()\n"); switch (token.value) { - CASE_BASIC_TYPES_X(t): + case BASIC_TYPES_X(t): nextToken(); break; @@ -2837,7 +2837,7 @@ goto Ldeclaration; } - CASE_BASIC_TYPES: + case BASIC_TYPES: case TOKtypedef: case TOKalias: case TOKconst: @@ -3630,7 +3630,7 @@ switch (t->value) { - CASE_BASIC_TYPES: + case BASIC_TYPES: t = peek(t); break; @@ -4270,7 +4270,7 @@ break; } - CASE_BASIC_TYPES_X(t): + case BASIC_TYPES_X(t): nextToken(); L1: check(TOKdot, t->toChars()); @@ -4766,7 +4766,7 @@ case TOKfile: case TOKline: #endif - CASE_BASIC_TYPES: // (type)int.size + case BASIC_TYPES: // (type)int.size { // (type) una_exp Type *t;