From 5f091c46ce04c004e4a2dff3965a24e22025850a Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Mon, 15 Jun 2015 12:17:19 -0700 Subject: [PATCH] Allowing _ as first character of identifiers in .fbs/.json. Change-Id: Ie2cb42632f6a907a38e10b2c9be1536cf330b2fa Tested: on Linux. --- src/idl_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index 0d0f7defe..37a3c6a2f 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -198,7 +198,7 @@ void Parser::Next() { } // fall thru default: - if (isalpha(static_cast(c))) { + if (isalpha(static_cast(c)) || c == '_') { // Collect all chars of an identifier: const char *start = cursor_ - 1; while (isalnum(static_cast(*cursor_)) ||