mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 11:29:24 +02:00
Fix for Mantis #25215.
compiler/scanner.pas, tscannerfile.readtoken: * after trying to read a _INTCONST check whether a valid first character for an identifier follows and give a syntax error if that is not the case + added test git-svn-id: trunk@25835 -
This commit is contained in:
parent
d91d4afb0f
commit
d908dbeec1
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12486,6 +12486,7 @@ tests/webtbf/tw24495.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw24588.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw2478.pp svneol=native#text/plain
|
||||
tests/webtbf/tw25029.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw25215.pp svneol=native#text/pascal
|
||||
tests/webtbf/tw2562.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2657.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2670.pp svneol=native#text/plain
|
||||
|
@ -4549,6 +4549,9 @@ type
|
||||
readnumber;
|
||||
if length(pattern)=1 then
|
||||
begin
|
||||
{ does really an identifier follow? }
|
||||
if not (c in ['_','A'..'Z','a'..'z']) then
|
||||
message2(scan_f_syn_expected,tokeninfo^[_ID].str,c);
|
||||
readstring;
|
||||
token:=_ID;
|
||||
idtoken:=_ID;
|
||||
|
9
tests/webtbf/tw25215.pp
Normal file
9
tests/webtbf/tw25215.pp
Normal file
@ -0,0 +1,9 @@
|
||||
{ %FAIL }
|
||||
|
||||
program tw25215;
|
||||
var
|
||||
&:integer;
|
||||
begin
|
||||
writeln(&);
|
||||
//readln;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user