[Lazarus] Lazarus installation on Mac plus other thoughts
Juha Manninen
juha.manninen62 at gmail.com
Tue Jul 27 15:49:57 CEST 2010
Hi,
I am just playing around with the CodeTools and have the following:
> P := node.CodePos.P;
> Tool := TStandardCodeTool(CodeToolBoss.GetCodeToolForSource(node.CodePos.Code, false, false));
> debugln(['identifier: ', Tool.ExtractIdentifier(P)]);
where node.CodePos.Code is the code of a unit and P is the starting
position of something like
function foo(foobar: TSomething): TSomethingElse;
Tool.ExtractIdentifier() will now return the string "function". Isn't
function a reserved word and not an Identifier? What is the codetool's
understanding of an identifier and how do I search for the identifier?
The end result I am trying to achieve is to point it to somewhere and
then have it return the *position* of the next Identifier (not just the
next word). I know that ExtractIdentifier() won't help me with the
position but I am just in the phase of some initial experimenting with
it and it makes me wonder what the codetool's understanding of an
"identifier" is and how to tell it that i am interested in the
identifier of the declaration and not just the next word in the code.
More information about the Lazarus
mailing list