An user-defined attribute name validation (#4689)

* User-declared attribute should be either identifier or string with the identifier.

* Attribute can be identifier or string in metadata.
This commit is contained in:
Vladimir Glavnyy
2018-04-06 23:07:59 +07:00
committed by Wouter van Oortmerssen
parent af3c598189
commit 7eb4c6098e
2 changed files with 11 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ include = `include` string\_constant `;`
namespace\_decl = `namespace` ident ( `.` ident )* `;`
attribute\_decl = `attribute` string\_constant `;`
attribute\_decl = `attribute` ident | `"`ident`"` `;`
type\_decl = ( `table` | `struct` ) ident metadata `{` field\_decl+ `}`