-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completion cleanup and support adding keywords
- Loading branch information
Showing
9 changed files
with
380 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
|
||
env: | ||
FPC_VER: release_3_2_2 | ||
LAZ_VER: lazarus_2_2_4 | ||
LAZ_VER: fixes_3_0 | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
Author: Raymond van Venetië and Merlijn Wajer | ||
Project: Simba (https://github.com/MerlijnWajer/Simba) | ||
License: GNU General Public License (https://www.gnu.org/licenses/gpl-3.0) | ||
} | ||
unit simba.ide_codetools_keywords; | ||
|
||
{$i simba.inc} | ||
|
||
interface | ||
|
||
uses | ||
Classes, SysUtils, | ||
simba.mufasatypes, simba.ide_codetools_parser, simba.ide_initialization; | ||
|
||
function GetKeywords: TDeclarationArray; | ||
|
||
implementation | ||
|
||
uses | ||
lpparser, | ||
simba.list; | ||
|
||
type | ||
TKeywordList = specialize TSimbaObjectList<TDeclaration>; | ||
|
||
var | ||
KeywordsList: TKeywordList; | ||
|
||
procedure CreateKeywords; | ||
var | ||
Keyword: TLapeKeyword; | ||
begin | ||
KeywordsList := TKeywordList.Create(True); | ||
for Keyword in Lape_Keywords do | ||
KeywordsList.Add(TDeclaration_Keyword.Create(Keyword.Keyword.ToLower())); | ||
end; | ||
|
||
function GetKeywords: TDeclarationArray; | ||
begin | ||
Result := KeywordsList.ToArray(); | ||
end; | ||
|
||
initialization | ||
SimbaIDEInitialization_AddBeforeCreate(@CreateKeywords, 'Codetools Create Keywords'); | ||
|
||
finalization | ||
if (KeywordsList <> nil) then | ||
FreeAndNil(KeywordsList); | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.