mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 13:29:26 +01:00 
			
		
		
		
	codetools: parsing external class field
git-svn-id: trunk@54479 -
This commit is contained in:
		
							parent
							
								
									ff0f6438ef
								
							
						
					
					
						commit
						33bab6516c
					
				@ -1009,6 +1009,8 @@ function TPascalParserTool.KeyWordFuncClassIdentifier: boolean;
 | 
				
			|||||||
    MyEnum: (MyEnumm1, MyEnumm2 := 2, MyEnummy3);
 | 
					    MyEnum: (MyEnumm1, MyEnumm2 := 2, MyEnummy3);
 | 
				
			||||||
    MySet: set of (MyEnummy4 := 4 , MyEnummy5);
 | 
					    MySet: set of (MyEnummy4 := 4 , MyEnummy5);
 | 
				
			||||||
    MyRange: 3..5;
 | 
					    MyRange: 3..5;
 | 
				
			||||||
 | 
					    Name: integer; external name '$Name';
 | 
				
			||||||
 | 
					    Name: integer external name '$Name';
 | 
				
			||||||
  examples for type:
 | 
					  examples for type:
 | 
				
			||||||
    TCompareFunc = function(const Item1, Item2: T): Integer;
 | 
					    TCompareFunc = function(const Item1, Item2: T): Integer;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -3356,10 +3358,12 @@ var
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  function CanExternal: Boolean; inline;
 | 
					  function CanExternal: Boolean; inline;
 | 
				
			||||||
  begin
 | 
					  begin
 | 
				
			||||||
    Result:=(CurNode.Parent.Desc in [ctnVarSection,ctnClassClassVar])
 | 
					    if (CurNode.Parent.Desc in [ctnVarSection,ctnClassClassVar])
 | 
				
			||||||
      and ((CurNode.Parent.Parent.Desc in AllCodeSections)
 | 
					      and (CurNode.Parent.Parent.Desc in AllCodeSections) then exit(true);
 | 
				
			||||||
           or ((CurNode.Parent.Parent.Desc in (AllClassBaseSections+AllClassInterfaces))
 | 
					    if (CurNode.Parent.Desc in (AllClassBaseSections+AllClassInterfaces))
 | 
				
			||||||
              and Scanner.Values.IsDefined('CPUJVM')));
 | 
					        and ((cmsExternalClass in Scanner.CompilerModeSwitches)
 | 
				
			||||||
 | 
					             or Scanner.Values.IsDefined('CPUJVM')) then exit(true);
 | 
				
			||||||
 | 
					    Result:=false;
 | 
				
			||||||
  end;
 | 
					  end;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function CanPublic: Boolean; inline;
 | 
					  function CanPublic: Boolean; inline;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user