Leading underscores in identifiers in .fbs

已查看 33 次
跳至第一个未读帖子

Stephen Schwink

未读,
2015年6月8日 21:31:352015/6/8
收件人 flatb...@googlegroups.com
In the FBS formal grammar, what does "ident" mean?

I would like to parse JSON in which field names may begin with a leading underscore, like {"_foo": true}.

To do this, I have a .fbs containing a declaration like this:

table FooTable {

  _foo:bool;

}


Unfortunately, the parser complains when I load this schema via flatbuffers::LoadFile:

error: illegal character: _


Any guidance on what identifiers are supported in the schema?


Thanks

Wouter van Oortmerssen

未读,
2015年6月10日 13:17:202015/6/10
收件人 Stephen Schwink、flatb...@googlegroups.com
That is an oversight, will fix. Underscores are currently supported anywhere but at the start.


--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stephen Schwink

未读,
2015年6月10日 16:53:022015/6/10
收件人 flatb...@googlegroups.com、stephen...@gmail.com
Awesome, thank you!

Wouter van Oortmerssen

未读,
2015年6月15日 16:10:312015/6/15
收件人 Stephen Schwink、flatb...@googlegroups.com
回复全部
回复作者
转发
0 个新帖子