Skip to content

Conversation

gravejester
Copy link
Contributor

This is all my commits since forking the main repository. It includes the first commits where I tried to fix the bugs in the matching rules, but at some point I decided to do a complete refactoring of the whole file.

Notable changes:

  • Supports the Stop Parsing operator
  • Added some illegal scopes (bad variable names and space after backtick ++)
  • Moved almost all matching rules into the repository
  • Grouped matching rules logically
  • Added comments where I felt it was needed
  • Much better command highlighting, with highlighting of parameters
  • Workaround for highlighting the reserved word 'default' in switch-blocks (Will only highlight the word inside scriptblocks, so will also highlight in {default}
  • Fixed highlighting of comment based help keywords
  • More consequent highlighting of numerical constants
  • Changed some scope names
  • Better type highlighting
  • Highlighting of keywords in classes
  • Added highlighting of built-in aliases and executable files (.ps1, .exe etc)
  • Added highlighting of some missing operators
  • Better highlighting of properties/members
  • Added test-files for testing syntax highlighting (in \examples)

Use these links to check before/after:
Old vs New

@msftclas
Copy link

msftclas commented Jun 9, 2016

Hi @gravejester, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@msftclas
Copy link

msftclas commented Jun 9, 2016

@gravejester, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

@gravejester
Copy link
Contributor Author

Nice bot. :)

@daviwil
Copy link
Contributor

daviwil commented Jun 9, 2016

Awesome! So many great improvements here. I was just spot checking the before and after examples you linked to and noticed this:

image

Looks like the #\test.exe $roman part should be considered a comment but isn't in your latest changes. If it's easy to fix for this PR it'd be great to have it in. Otherwise we can just file a bug and fix it later.

This is excellent work, man. Once you feel like you're done making changes for now you should submit a pull request to the VS Code repo to replace this file:

https://github.com/Microsoft/vscode/blob/master/extensions/powershell/syntaxes/PowershellSyntax.tmLanguage

I want you to get the credit for these contributions by getting your PR accepted there :)

@daviwil
Copy link
Contributor

daviwil commented Jun 9, 2016

And when you submit your PR to VS Code, mention me in the PR message so that I can jump in and encourage them to accept the change.

@gravejester
Copy link
Contributor Author

heh.. that is actually just a typo in the comment, it should say 'shouldn't' :D

@daviwil
Copy link
Contributor

daviwil commented Jun 10, 2016

Ahhh! That makes more sense :) Great, merging this now, thanks again!

@daviwil daviwil merged commit 4f97249 into PowerShell:master Jun 10, 2016
@gravejester
Copy link
Contributor Author

Cool, thanks! :)

gravejester added a commit to gravejester/vscode that referenced this pull request Jun 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants