mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 06:56:01 +02:00
codetools: renamed ilcfStartOfStatement
git-svn-id: trunk@21020 -
This commit is contained in:
parent
0579ec74fb
commit
8bff99b9f7
@ -163,7 +163,7 @@ type
|
|||||||
|
|
||||||
TIdentifierListContextFlag = (
|
TIdentifierListContextFlag = (
|
||||||
ilcfStartInStatement, // context starts in statements. e.g. between begin..end
|
ilcfStartInStatement, // context starts in statements. e.g. between begin..end
|
||||||
ilcfStartIsLValue, // atom is start of statement. e.g. 'A|:=' or 'A|;', does not check if A can be assigned
|
ilcfStartOfStatement, // atom is start of statement. e.g. 'A|:=' or 'A|;', does not check if A can be assigned
|
||||||
ilcfStartOfOperand, // atom is start of an operand. e.g. 'A|.B'
|
ilcfStartOfOperand, // atom is start of an operand. e.g. 'A|.B'
|
||||||
ilcfStartIsSubIdent, // atom in front is point
|
ilcfStartIsSubIdent, // atom in front is point
|
||||||
ilcfNeedsEndSemicolon, // after context a semicolon is needed. e.g. 'A| end'
|
ilcfNeedsEndSemicolon, // after context a semicolon is needed. e.g. 'A| end'
|
||||||
@ -1093,8 +1093,8 @@ const
|
|||||||
var
|
var
|
||||||
NewItem: TIdentifierListItem;
|
NewItem: TIdentifierListItem;
|
||||||
begin
|
begin
|
||||||
//DebugLn(['AddCompilerProcedure ',AProcName,' ',ilcfStartIsLValue in CurrentIdentifierList.ContextFlags]);
|
//DebugLn(['AddCompilerProcedure ',AProcName,' ',ilcfStartOfStatement in CurrentIdentifierList.ContextFlags]);
|
||||||
if not (ilcfStartIsLValue in CurrentIdentifierList.ContextFlags) then exit;
|
if not (ilcfStartOfStatement in CurrentIdentifierList.ContextFlags) then exit;
|
||||||
if not (ilcfStartOfOperand in CurrentIdentifierList.ContextFlags) then exit;
|
if not (ilcfStartOfOperand in CurrentIdentifierList.ContextFlags) then exit;
|
||||||
|
|
||||||
NewItem:=TIdentifierListItem.Create(
|
NewItem:=TIdentifierListItem.Create(
|
||||||
@ -1846,7 +1846,7 @@ begin
|
|||||||
or UpAtomIs('REPEAT') or UpAtomIs('ASM') or UpAtomIs('ELSE')
|
or UpAtomIs('REPEAT') or UpAtomIs('ASM') or UpAtomIs('ELSE')
|
||||||
then begin
|
then begin
|
||||||
CurrentIdentifierList.ContextFlags:=
|
CurrentIdentifierList.ContextFlags:=
|
||||||
CurrentIdentifierList.ContextFlags+[ilcfStartIsLValue];
|
CurrentIdentifierList.ContextFlags+[ilcfStartOfStatement];
|
||||||
end;
|
end;
|
||||||
// check if expression
|
// check if expression
|
||||||
if UpAtomIs('IF') or UpAtomIs('CASE') or UpAtomIs('WHILE')
|
if UpAtomIs('IF') or UpAtomIs('CASE') or UpAtomIs('WHILE')
|
||||||
@ -1886,7 +1886,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
// check if a semicolon is needed at the end
|
// check if a semicolon is needed at the end
|
||||||
if (not (ilcfNoEndSemicolon in CurrentIdentifierList.ContextFlags))
|
if (not (ilcfNoEndSemicolon in CurrentIdentifierList.ContextFlags))
|
||||||
and (not (ilcfStartIsLValue in CurrentIdentifierList.ContextFlags))
|
and (not (ilcfStartOfStatement in CurrentIdentifierList.ContextFlags))
|
||||||
then begin
|
then begin
|
||||||
// check if a semicolon is needed at the end
|
// check if a semicolon is needed at the end
|
||||||
if (CurPos.Flag in [cafEnd,cafBegin])
|
if (CurPos.Flag in [cafEnd,cafBegin])
|
||||||
|
@ -575,7 +575,7 @@ begin
|
|||||||
// add assignment operator :=
|
// add assignment operator :=
|
||||||
if (CursorToLeft=0)
|
if (CursorToLeft=0)
|
||||||
and (AddChar='')
|
and (AddChar='')
|
||||||
and (ilcfStartIsLValue in IdentList.ContextFlags)
|
and (ilcfStartOfStatement in IdentList.ContextFlags)
|
||||||
and (not IdentItem.HasChilds)
|
and (not IdentItem.HasChilds)
|
||||||
and (not IdentList.StartUpAtomBehindIs(':='))
|
and (not IdentList.StartUpAtomBehindIs(':='))
|
||||||
and (IdentItem.CanBeAssigned)
|
and (IdentItem.CanBeAssigned)
|
||||||
|
Loading…
Reference in New Issue
Block a user