mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 12:30:36 +02:00
lazdelphi: register parser
This commit is contained in:
parent
2bff2330c6
commit
5bcd4dfcc9
@ -9,6 +9,7 @@ uses
|
|||||||
|
|
||||||
const
|
const
|
||||||
SubToolDelphi = 'Delphi';
|
SubToolDelphi = 'Delphi';
|
||||||
|
SubToolDelphiPriority = SubToolFPCPriority-10;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -23,13 +24,16 @@ type
|
|||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure ReadLine(Line: string; OutputIndex: integer; IsStdErr: boolean;
|
procedure ReadLine(Line: string; OutputIndex: integer; IsStdErr: boolean;
|
||||||
var Handled: boolean); override;
|
var Handled: boolean); override; // (worker thread)
|
||||||
class function DefaultSubTool: string; override;
|
class function DefaultSubTool: string; override;
|
||||||
|
class function GetParserName: string; override;
|
||||||
|
class function GetLocalizedParserName: string; override;
|
||||||
|
class function Priority: integer; override;
|
||||||
end;
|
end;
|
||||||
TDelphiCompilerParserClass = class of TDelphiCompilerParser;
|
TDelphiCompilerParserClass = class of TDelphiCompilerParser;
|
||||||
|
|
||||||
var
|
var
|
||||||
IDEDelphiCompilerParser: TDelphiCompilerParserClass = nil;
|
IDEDelphiCompilerParserClass: TDelphiCompilerParserClass = nil;
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
|
||||||
@ -37,7 +41,7 @@ implementation
|
|||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
|
ExternalToolList.RegisterParser(TDelphiCompilerParser);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TDelphiCompilerParser }
|
{ TDelphiCompilerParser }
|
||||||
@ -45,12 +49,16 @@ end;
|
|||||||
constructor TDelphiCompilerParser.Create(AOwner: TComponent);
|
constructor TDelphiCompilerParser.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
|
|
||||||
|
// filename(linenumber): E2003 Undeclared identifier: 'foo'
|
||||||
FRegExprFilenameLineIDMsg:=TRegExpr.Create;
|
FRegExprFilenameLineIDMsg:=TRegExpr.Create;
|
||||||
FRegExprFilenameLineIDMsg.ModifierStr:='I';
|
FRegExprFilenameLineIDMsg.ModifierStr:='I';
|
||||||
// filename(linenumber): E2003 Undeclared identifier: 'foo'
|
FRegExprFilenameLineIDMsg.Expression:='^(.*)\(([0-9]+)\): ([HNWEF])([0-9]+) (.*)$';
|
||||||
FRegExprFilenameLineIDMsg.Expression:='^(.*)\([0-9]+)\): ([HNWEF])([0-9]+) (.*)$';
|
|
||||||
// filename(linenumber): Fatal: F2613 Unit 'Unit3' not found.
|
// filename(linenumber): Fatal: F2613 Unit 'Unit3' not found.
|
||||||
FRegExprFilenameLineUrgencyIDMsg.Expression:='^(.*)\([0-9]+)\) ([a-zA-Z]+): ([HNWEF])([0-9]+) (.*)$';
|
FRegExprFilenameLineUrgencyIDMsg:=TRegExpr.Create;
|
||||||
|
FRegExprFilenameLineUrgencyIDMsg.ModifierStr:='I';
|
||||||
|
FRegExprFilenameLineUrgencyIDMsg.Expression:='^(.*)\(([0-9]+)\) ([a-zA-Z]+): ([HNWEF])([0-9]+) (.*)$';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TDelphiCompilerParser.Destroy;
|
destructor TDelphiCompilerParser.Destroy;
|
||||||
@ -152,7 +160,22 @@ end;
|
|||||||
|
|
||||||
class function TDelphiCompilerParser.DefaultSubTool: string;
|
class function TDelphiCompilerParser.DefaultSubTool: string;
|
||||||
begin
|
begin
|
||||||
Result:='dcc';
|
Result:='DCC';
|
||||||
|
end;
|
||||||
|
|
||||||
|
class function TDelphiCompilerParser.GetParserName: string;
|
||||||
|
begin
|
||||||
|
Result:='Delphi Compiler';
|
||||||
|
end;
|
||||||
|
|
||||||
|
class function TDelphiCompilerParser.GetLocalizedParserName: string;
|
||||||
|
begin
|
||||||
|
Result:='Delphi Compiler';
|
||||||
|
end;
|
||||||
|
|
||||||
|
class function TDelphiCompilerParser.Priority: integer;
|
||||||
|
begin
|
||||||
|
Result:=SubToolDelphiPriority;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user