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

PowerShell: new parser imported from Geany #2228

Merged

Conversation

masatake
Copy link
Member

@masatake masatake commented Oct 6, 2019

This pull request adds one of the extra parsers we have in Geany except
those defined in c.c and except the markdown parser which is readLine()
based and not really superior to the regex-based parser ctags uses
(we should probably use the ctags parser in Geany instead).

The added a parser is for PowerShell (https://en.wikipedia.org/wiki/PowerShell)

The original version is written for Geany by Enrico Tröger enrico.troeger@uvena.de:
commit 8a6fbd978691fa324bd5c5ff171bcd508e3b466c
Author: Enrico Tröger enrico.troeger@uvena.de
Date: Sat Apr 25 16:17:03 2015 +0200

Add PowerShell tag parser

@masatake did when merging:

  • edit this message,
  • replace -1, the value representing unknown kind with
    KIND_GHOST_INDEX, and
  • extend the original test case for testing signature.

Known issue:

  • q/qualified extra doesn't work, and
  • the version of GPL doesn't written explicitly.

This pull request adds one of the extra parsers we have in Geany except
those defined in c.c and except the markdown parser which is readLine()
based and not really superior to the regex-based parser ctags uses
(we should probably use the ctags parser in Geany instead).

The added a parser is for PowerShell (https://en.wikipedia.org/wiki/PowerShell)

The original version is written for Geany by Enrico Tröger <enrico.troeger@uvena.de>:
commit 8a6fbd978691fa324bd5c5ff171bcd508e3b466c
Author: Enrico Tröger <enrico.troeger@uvena.de>
Date:   Sat Apr 25 16:17:03 2015 +0200

    Add PowerShell tag parser

@masatake did when merging:
* edit this message,
* replace -1, the value representing unknown kind with
  KIND_GHOST_INDEX, and
* extend the original test case for testing signature.

Known issue:
* q/qualified extra doesn't work, and
* the version of GPL doesn't written explicitly.
@coveralls
Copy link

coveralls commented Oct 6, 2019

Coverage Status

Coverage increased (+0.03%) to 86.303% when pulling 3b275cf on masatake:import-powershell-from-geany into c7f65f3 on universal-ctags:master.

Close universal-ctags#2144 again.

Quoted from universal-ctags#2144:
============================================================

@masatake commented 18 hours ago
------------------------------------------------------------
@eht16, I imported your NSIS parser from Geany to Universal-ctags.

After merging, I noticed the version of GPL was not written explictly:

*   This source code is released for free distribution under the terms of the
*   GNU General Public License.

Can I change this to

*   This source code is released for free distribution under the terms of the
*   GNU General Public License version 2 or (at your option) any later version.

?

masatake commented 2 hours ago
------------------------------------------------------------
@eht16, hi, again.
I have one more request.
I would like to do the same (writing the version of GPL explitly) on your powershell parser. Is it o.k.?

@eht16 commented 6 hours ago
------------------------------------------------------------
Yes, it's fine by me.
@masatake masatake merged commit 34185f5 into universal-ctags:master Oct 7, 2019
Comment on lines +123 to +125
<ClCompile Include="..\main\powershell.c">
<Filter>Source Files\Main</Filter>
</ClCompile>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

powershell.c is in the parser folder, not main.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

Doesn't test running at appveyor use win32/ctags_vs2013.vcxproj.filters ?

Ideally, this kind of mistake should be detected by a test.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*.vcxproj.filters is only used by the Visual Studio IDE for showing the (virtual) directory tree.
It is not used for building, so it cannot detect by CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants