From 71cf6359c25991094829ba865afcc48605a66b6f Mon Sep 17 00:00:00 2001 From: Stuart Taylor Date: Fri, 22 Jul 2016 13:40:07 +0100 Subject: [PATCH] Fix parser bug with event fields. --- .../spatialos/schema/intellij/parser/SchemaParser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/improbable/spatialos/schema/intellij/parser/SchemaParser.java b/src/com/improbable/spatialos/schema/intellij/parser/SchemaParser.java index 54c28b8..f920748 100644 --- a/src/com/improbable/spatialos/schema/intellij/parser/SchemaParser.java +++ b/src/com/improbable/spatialos/schema/intellij/parser/SchemaParser.java @@ -228,7 +228,7 @@ private void parseOptionDefinition() { consumeTokenAs(null); if (!isToken(SchemaLexer.IDENTIFIER)) { typeMarker.drop(); - error(marker, FIELD_DEFINITION, Construct.STATEMENT, "Expected typename after '%s<'.", name); + error(marker, FIELD_DEFINITION, Construct.STATEMENT, "Expected typename after '%s'.", name); return null; } name = name + getIdentifier(); @@ -278,6 +278,7 @@ private void parseFieldDefinition() { consumeTokenAs(FIELD_NAME); if (isToken(SchemaLexer.SEMICOLON)) { consumeTokenAs(null); + marker.done(FIELD_DEFINITION); return; } if (!isToken(SchemaLexer.EQUALS)) {