Allowing _ as first character of identifiers in .fbs/.json.

Change-Id: Ie2cb42632f6a907a38e10b2c9be1536cf330b2fa
Tested: on Linux.
parent a96bfdb3
...@@ -198,7 +198,7 @@ void Parser::Next() { ...@@ -198,7 +198,7 @@ void Parser::Next() {
} }
// fall thru // fall thru
default: default:
if (isalpha(static_cast<unsigned char>(c))) { if (isalpha(static_cast<unsigned char>(c)) || c == '_') {
// Collect all chars of an identifier: // Collect all chars of an identifier:
const char *start = cursor_ - 1; const char *start = cursor_ - 1;
while (isalnum(static_cast<unsigned char>(*cursor_)) || while (isalnum(static_cast<unsigned char>(*cursor_)) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment