mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 14:46:02 +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/tw24588.pp svneol=native#text/pascal
|
||||||
tests/webtbf/tw2478.pp svneol=native#text/plain
|
tests/webtbf/tw2478.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw25029.pp svneol=native#text/pascal
|
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/tw2562.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2657.pp svneol=native#text/plain
|
tests/webtbf/tw2657.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw2670.pp svneol=native#text/plain
|
tests/webtbf/tw2670.pp svneol=native#text/plain
|
||||||
|
@ -4549,6 +4549,9 @@ type
|
|||||||
readnumber;
|
readnumber;
|
||||||
if length(pattern)=1 then
|
if length(pattern)=1 then
|
||||||
begin
|
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;
|
readstring;
|
||||||
token:=_ID;
|
token:=_ID;
|
||||||
idtoken:=_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