Browse Source

* Allow identifiers to start with _

Michaël Van Canneyt 3 years ago
parent
commit
9641700974
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-base/fpexprpars.pas

+ 1 - 1
packages/fcl-base/fpexprpars.pas

@@ -1460,7 +1460,7 @@ begin
     Result := DoNumber(nkBinary)
     Result := DoNumber(nkBinary)
   else if IsDigit(C, nkDecimal) then
   else if IsDigit(C, nkDecimal) then
     Result:=DoNumber(nkDecimal)
     Result:=DoNumber(nkDecimal)
-  else if IsAlpha(C) or (C='"') then
+  else if IsAlpha(C) or (C='"') or (C='_') then
     Result:=DoIdentifier
     Result:=DoIdentifier
   else
   else
     ScanError(Format(SErrUnknownCharacter,[FPos,C]))  ;
     ScanError(Format(SErrUnknownCharacter,[FPos,C]))  ;