From 297ab5821271f1e8fb6661c48ca5173127dc70ca Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 15 Aug 2021 15:59:52 -0400 Subject: [PATCH] cwObject.cpp : Allow strings with '.' to match the 'id' token. --- cwObject.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/cwObject.cpp b/cwObject.cpp index ddd33d5..7037904 100644 --- a/cwObject.cpp +++ b/cwObject.cpp @@ -24,7 +24,8 @@ namespace cw kCommaLexTId, kTrueLexTId, kFalseLexTId, - kNullLexTId + kNullLexTId, + kSegmentedIdLexTId, // id with embedded periods }; idLabelPair_t _objTokenArray[] = @@ -42,6 +43,18 @@ namespace cw }; + unsigned _lexSegmentedIdMatcher( const char* cp, unsigned cn ) + { + unsigned i = 0; + if( isalpha(cp[0]) || (cp[0]== '_')) + { + i = 1; + for(; i