From c45f5e2bd966a8c80e4a0335e9ed02a865d1e61e Mon Sep 17 00:00:00 2001 From: Mickey Reiss Date: Thu, 15 Nov 2018 17:22:59 -0800 Subject: [PATCH] Fix bug in parser grammar --- internal/ast/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ast/parser.go b/internal/ast/parser.go index 0101d50..ba54133 100644 --- a/internal/ast/parser.go +++ b/internal/ast/parser.go @@ -61,10 +61,10 @@ type AST struct { type ASTElement struct { Comment string `parser:"{ @Comment }"` - Model *ASTModel `parser:" 'model' @@"` + Model *ASTModel `parser:"( 'model' @@"` Enum *ASTEnum `parser:"| 'enum' @@"` Option *ASTOption `parser:"| 'option' @@"` - Struct *ASTStruct `parser:"| 'struct' @@"` + Struct *ASTStruct `parser:"| 'struct' @@ )"` } type ASTModel struct {