Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functionLists for VimScript and STL #263

Merged
merged 7 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Your submission must also include some Unit Test information, similar to the [Fu
0. Make sure that your UDL and FunctionList definition are working in your local Notepad++, showing the right functions (and classes) in the Function List panel for your sample file.
1. Run `notepad++ -multiInst -nosession -export=functionList -udl="<UDL Name>" "<SampleFilePath>"` , which will create `unitTest.result.json` in the same directory as your example file
2. Create `Test\functionList\<DirectoryName>\` in your repo, where `<DirectoryName>` must match the `id-name` from the JSON, exactly.
3. Copy `unitTest.result.json` to `Test\functionList\unitTest.expected.result`
3. Copy `unitTest.result.json` to `Test\functionList\<DirectoryName>\unitTest.expected.result`

## HOW TO Submit Pull Request

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"leaves":["solid cube"],"root":"unitTest"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"leaves":["build_go_files"],"root":"unitTest"}
11 changes: 6 additions & 5 deletions Test/localUnitTestLauncher.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ cd Test
$PowerEditorSource = "c:\Program Files\Notepad++\"
$PowerEditorLocal = ".\PowerEditor"

if ( Test-Path $PowerEditorLocal ) {
Remove-Item -Recurse -Force $PowerEditorLocal
if ( !(Test-Path $PowerEditorLocal) ) {
# to be more efficient, only copy from PowerEditorSource if we
# don't already have the PowerEditorLocal hierarchy
# (that also lets me keep a customized local
Copy-Item "$PowerEditorSource" -Destination "$PowerEditorLocal\bin" -Recurse -Force
}

Copy-Item "$PowerEditorSource" -Destination "$PowerEditorLocal\bin" -Recurse -Force
New-Item "$PowerEditorLocal\bin\doLocalConf.xml" > $nul
New-Item "$PowerEditorLocal\bin\doLocalConf.xml" -ea 0 > $nul
New-Item "$PowerEditorLocal\bin\userDefineLangs" -ItemType Directory -ea 0 > $nul
python doUnitTests.py $PowerEditorLocal\bin

Expand Down
138 changes: 0 additions & 138 deletions Test/overrideMap.xml

This file was deleted.

63 changes: 0 additions & 63 deletions Test/unitTest.ps1

This file was deleted.

3 changes: 0 additions & 3 deletions functionList/.readme.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,21 @@
\=========================================================================== -->
<NotepadPlus>
<functionList>
<!-- =========================================== [ regexGlobalTest ] -->
<!-- Regular Expression Global Test -->
<!-- ================================================================= [ STL ] -->
<!-- STL 3D Object (ASCII) -->
<!-- based on rules https://learnvim.irian.to/vimscript/vimscript_functions -->

<parser
displayName="RegexGlobalTest"
id ="regexGlobalTest"
id="stl_function"
displayName="STL"
>
<function
mainExpr="\((?>[^()]|(?R))*\)"
/>
mainExpr="^\h*solid\h+\w+"
>
<functionName>
<nameExpr expr="^\h*\Ksolid\h+\w+" />
</functionName>
</function>
</parser>
</functionList>
</NotepadPlus>
29 changes: 29 additions & 0 deletions functionList/Vimscript_by_rdipardo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- ==========================================================================\
|
| To learn how to make your own language parser, please check the following
| link:
| https://npp-user-manual.org/docs/function-list/
|
\=========================================================================== -->
<NotepadPlus>
<functionList>
<!-- ================================================================= [ Vim script ] -->
<!-- Vim Script -->
<!-- based on rules https://learnvim.irian.to/vimscript/vimscript_functions -->

<parser
id="vimscript_fuunc"
displayName="Vim Script"
commentExpr="(?-s:#.*)"
>
<function
mainExpr="^\h*func(tion)?!?\h+(?-i:\u|s:\l?)\w+"
>
<functionName>
<nameExpr expr="^\h*func(tion)?!?\h+\K(?-i:\u|s:\K\l?)\w+" />
</functionName>
</function>
</parser>
</functionList>
</NotepadPlus>
Loading