From 036d80f78908608080bee1121467ed697c0965a0 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Thu, 29 Nov 2012 11:38:33 -0800 Subject: [PATCH] Fixed issue #21 --- parser.d | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parser.d b/parser.d index 42fb723..2cf1ddd 100644 --- a/parser.d +++ b/parser.d @@ -518,6 +518,7 @@ body e.line = tokens[index].lineNumber; ++index; string enumType; + e.protection = protection; if (tokens[index] == TokenType.LBrace) goto enumBody; @@ -549,7 +550,8 @@ body } } - e.name = tokens[index++].value; + if (isIdentifierOrType(tokens[index])) + e.name = tokens[index++].value; if (tokens[index] == TokenType.Colon) {