mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-09-11 02:35:41 +03:00
Fix the definition of an identifier in indexed search to include a dash followed a digit
This commit is contained in:
parent
7b7c29c1df
commit
bbb4f78a73
@ -85,7 +85,8 @@ Lexer::Lexeme GenericLexer::next()
|
||||
|
||||
case Identifier: {
|
||||
char nextCh = safeAt(mBuffer, mIndex + 1);
|
||||
bool compound = (ch == '-' || ch == '\'') && isAlpha(nextCh);
|
||||
bool compound = ((ch == '\'' && isAlpha(nextCh)) ||
|
||||
(ch == '-' && (isAlpha(nextCh) || isDigit(nextCh))));
|
||||
if (ch != '_' && !alpha && !digit && !compound)
|
||||
return {Identifier, mBuffer.mid(startPos, mIndex - startPos)};
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user