mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-01 22:09:28 +01:00
Note: the error messages for incorrect "misstyled" floating point numbers (e.g. "2e10foo") have changed because of this.
scanner.pas, tscannerfile.readtoken:
instead of tokenizing "2.", "2.e10", "2.e+10" and "2.e-10" as "_REALNUMBER" tokenize them as "_INTCONST _POINT", "_INTCONST _POINT _ID", "_INTCONST _POINT _ID _PLUS _INTCONST" "_INTCONST _POINT _ID _PLUS _INTCONST"; tokenizing of normal floating constants is not changed
pexpr.pas:
factor:
* extract the code for creating a new constant floating point from "factor" into a new function "real_const_node_from_pattern"
+ allow the parsing of postfixoperators for integer constants if a "." is encountered
+ postfixoperators: check for a "misstyled" floating point number if an ordinal const (not an enum and not a boolean) is encountered (the code is already partially prepared for type helper support)
+ Added tests
git-svn-id: trunk@23356 -
10 lines
74 B
ObjectPascal
10 lines
74 B
ObjectPascal
{ %FAIL }
|
|
|
|
program tb0230;
|
|
|
|
var
|
|
f: Single;
|
|
begin
|
|
f := 2.e-10foo;
|
|
end.
|