On Mon, 11 Oct 2010 22:17:05 +0200 Joost van der Sluis <[email protected]> wrote:
> On Mon, 2010-10-11 at 01:46 +0200, Mattias Gaertner wrote: > > On Sun, 10 Oct 2010 15:53:43 +0200 > > Joost van der Sluis <[email protected]> wrote: > > > > > Hi all, > > > > > > There is a xpcom-branch which adds the 'constref' parameter type to Free > > > Pascal. This can be useful for connecting to external api's > > > (http://bugs.freepascal.org/view.php?id=7612) > > > > > > Normally I would ask Mattias to add the 'constref' parsing to the > > > codetools and in most cases it's done within a few hours. But this case > > > I though: I can do this myself. > > > > When is constref a keyword and when not? > > Only in the declaration of the parameters of a > function/procedure/method: > > function/procedure test(constref param: integer); > > No-where else. Then it is not a global keyword. > > > Attached patch works for me, but I doubt it is ok. Why are there two > > > lists for keywords? (WordIsKeyword and WordIsDelphiKeyword) Is that for > > > the different fpc-compilation mode's? > > > > Yes. > > WordIsKeyword should probably better be named WordIsObjFPCKeyWord. > > > > > > > And what is AllKeyWords for? > > > > It is used by the simple beautifier. > > > > > > > And why is 'END' added to it, it is already in WordIsKeyword? > > > > Thanks for the hint. I removed it. > > And isn't it the case that all delphi-keywords are also ObjFpc-keywords? No. For example 'operator'. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
