The sources of the Free Pascal compiler, RTL, packages and utilities. See https://www.freepascal.org/ for more info.
Go to file
svenbarth d3660fec31 Implement support for parsing "generic [class] procedure" and "generic [class] function" in non-Delphi modes. Since "generic" is a prefix it is quite ugly to implement, but from a Pascal language point of view it fits better than "procedure generic xyz".
Supporting such a prefix of course means that all section handling code ("var", "type", etc.) needs to respect the case of a "generic" token followed by "function", "procedure" or "class" and thus abort doing its own business.
Maybe I'll find the time somewhen in the future to rework the parser (plus scanner?) a bit so that code like this gets more easy to add and more importantly less ugly.

pdecsub.pas:
  * extend parse_proc_dec() and parse_record_method_dec() so that they can be told that they are supposed to handle the to be parsed function/procedure/method header as a generic
pdecvar.pas:
  + new entry for tvar_dec_option named "vd_check_generic" to tell read_var_decls() and read_record_fields() to look out for "generic"
  * extend read_var_decls() and read_record_fields() to check for "generic" if needed and to clean up correctly if it is encountered
pdecl.pas:
  * the section handling procedures types_dec(), resourcestring_dec(), var_dec(), threadvar_dec() and consts_dec() all return whether they had encountered a "generic" token that was followed by one of $
pdecobj.pas:
  * extend method_dec() to take a parameter that says whether the method is supposed to be a generic one
  * parse_object_members: while read_record_fields() can handle "generic" we also need to handle the case of "generic" if no fields are allowed anymore
psub.pas:
  * extend read_proc() by the possibility to tell it that the procedure/function to be parsed is supposed to be generic
  * adjust read_declarations() and read_interface_declarations() to keep track of parsed "generic" tokens and to pass them on accordingly
ptype.pas:
  * parse_record_members: same remark as for pdecobj.parse_object_members

git-svn-id: trunk@32380 -
2015-11-20 16:50:58 +00:00
compiler Implement support for parsing "generic [class] procedure" and "generic [class] function" in non-Delphi modes. Since "generic" is a prefix it is quite ugly to implement, but from a Pascal language point of view it fits better than "procedure generic xyz". 2015-11-20 16:50:58 +00:00
ide * fixed IDE compilation with GDBMI=1 (mantis #28890) 2015-11-19 17:28:37 +00:00
installer * added SDL sources 2015-11-17 12:03:49 +00:00
packages * use OEM_FIXED_FONT instead of SYSTEM_FIXED_FONT in the win16 video unit 2015-11-19 23:47:41 +00:00
rtl * deprecated dt routines in unixutils. Julian routines already were 2015-11-20 15:06:29 +00:00
tests * properly determine the operand size for inline assembler references to procvar 2015-11-20 16:29:40 +00:00
utils * Examples 2015-11-20 11:34:44 +00:00
.gitattributes * properly determine the operand size for inline assembler references to procvar 2015-11-20 16:29:40 +00:00
.gitignore * Removed empty tests directory from svn 2014-11-08 15:47:53 +00:00
fpmake_add1.inc * Handle the location of each package at run-time, not at compilation time 2013-06-02 17:55:23 +00:00
fpmake_proc1.inc * Handle the location of each package at run-time, not at compilation time 2013-06-02 17:55:23 +00:00
fpmake.pp * Handle the location of each package at run-time, not at compilation time 2013-06-02 17:55:23 +00:00
Makefile * regenerated makefiles after adding the win16 target 2015-09-05 11:02:54 +00:00
Makefile.fpc * regenerated makefiles after adding the win16 target 2015-09-05 11:02:54 +00:00