|
@@ -19,7 +19,7 @@ unit PParser;
|
|
|
|
|
|
interface
|
|
interface
|
|
|
|
|
|
-uses SysUtils, PasTree;
|
|
|
|
|
|
+uses SysUtils, PasTree, PScanner;
|
|
|
|
|
|
resourcestring
|
|
resourcestring
|
|
SErrNoSourceGiven = 'No source file specified';
|
|
SErrNoSourceGiven = 'No source file specified';
|
|
@@ -81,7 +81,7 @@ function ParseSource(AEngine: TPasTreeContainer;
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
-uses Classes, PScanner;
|
|
|
|
|
|
+uses Classes;
|
|
|
|
|
|
type
|
|
type
|
|
|
|
|
|
@@ -108,6 +108,7 @@ type
|
|
function CreateElement(AClass: TPTreeElement; const AName: String;
|
|
function CreateElement(AClass: TPTreeElement; const AName: String;
|
|
AParent: TPasElement; AVisibility: TPasMemberVisibility): TPasElement;
|
|
AParent: TPasElement; AVisibility: TPasMemberVisibility): TPasElement;
|
|
public
|
|
public
|
|
|
|
+ Options : set of TPOptions;
|
|
constructor Create(AScanner: TPascalScanner; AFileResolver: TFileResolver;
|
|
constructor Create(AScanner: TPascalScanner; AFileResolver: TFileResolver;
|
|
AEngine: TPasTreeContainer);
|
|
AEngine: TPasTreeContainer);
|
|
function CurTokenName: String;
|
|
function CurTokenName: String;
|
|
@@ -1889,6 +1890,12 @@ var
|
|
'F':
|
|
'F':
|
|
if s[3] = 'i' then
|
|
if s[3] = 'i' then
|
|
FileResolver.AddIncludePath(Copy(s, 4, Length(s)));
|
|
FileResolver.AddIncludePath(Copy(s, 4, Length(s)));
|
|
|
|
+ 'S':
|
|
|
|
+ if s[3]='d' then
|
|
|
|
+ begin
|
|
|
|
+ include(Scanner.Options,po_delphi);
|
|
|
|
+ include(Parser.Options,po_delphi);
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
end else
|
|
end else
|
|
if Filename <> '' then
|
|
if Filename <> '' then
|