Skip to content

Misc fixes/changes #3

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

Closed
wants to merge 20 commits into from
Closed

Misc fixes/changes #3

wants to merge 20 commits into from

Conversation

gravejester
Copy link
Contributor

Fixes small bugs in the syntax highlighting rules. See commits for details.

@daviwil
Copy link
Contributor

daviwil commented May 27, 2016

Dude, this is amazing! Thanks a lot for fixing all of these issues. I forgot to get the contributor licensing automation set up on this repo, need to get someone to hook that up before I can accept the PR.

In the meantime, did you happen to create any example script file for testing these changes? It might be nice to add an examples folder with a script (or scripts) that demonstrate the syntax that the highlighter should work correctly for. This will help us determine in the future whether we've broken the things that you've fixed here.

Thanks a lot for doing this work!

@gerane
Copy link

gerane commented May 27, 2016

This is awesome! I totally agree with David on the examples.

@gravejester
Copy link
Contributor Author

Thanks @daviwil. I'm working on some of the more complicated stuff as well.

I have also started on an example file. Will finish that and get it uploaded to the repo. I won't be able to get all the cases, so hopefully others can help out writing edge-cases in this file so that I have something to test against while fiddling with complicated regexes :)

@Jaykul
Copy link

Jaykul commented May 27, 2016

What happened to the old example file(s)?

@daviwil
Copy link
Contributor

daviwil commented May 30, 2016

Looks like the test files @Jaykul is referring to are here:

https://github.com/SublimeText/PowerShell/tree/dev/tests/samples

Might be helpful to pull those over also.

@gravejester
Copy link
Contributor Author

@daviwil Nice, I will do that :) How is it going with getting the contributor licensing automation set up?

@daviwil
Copy link
Contributor

daviwil commented May 30, 2016

Still waiting on someone to turn it on for me, I'll ping them again tomorrow (everyone's out for a holiday today).

@gravejester
Copy link
Contributor Author

Ah.. sorry about that. There is no rush, I'm still tackling some of the more complicated stuff, and now I have a new test-file to test against as well.. will probably notice some stuff that needs fixing/tweaking :)

@vors
Copy link
Contributor

vors commented Jun 3, 2016

That is awesome!

I tried to use lightshow, mentioned in #2 to test your changes

You can also do the same:

Current highlighting vs @gravejester highlighting for the sample.

I used split screen and scroll both windows more-or-less in sync (is there a better way?).
On the screenshots bellow left side is original, right is updated syntax

Here are differences (both improvements and regressions) that I noticed:

  • Node is now a keyword in Configuration, cool!
  • Get-Foo -Param now highlights -Param with red. I think it's good
    But, it also introduce a regression: in the same context -foobar used to highlighted differently from -contains and other built-in operations.

image

  • -filter highlighted wrong, but it's pretty obscure case about multi-line interpolations in here-string. It's kind-of broken anyway.

image

  • Regression in complicated numeric constants (i.e. -0x34adMB)
    image

@gravejester
Copy link
Contributor Author

Nice @vors. Gonna have to play around with using lightshow to test my stuff.. easy for comparing. When I did this PR I only tested in Sublime Text with a different theme of course. For my newest code, I'm manually updating the tmlanguage file to test in vscode, but this is much simpler.

I'll take a look at the regressions you mentioned when I get home, but I have a fully refactored language file that I have been working on. Would rather get that perfect than use time on these (if they are complicated), so might end up closing this PR entirely and create a new one for the newest version.

@vors
Copy link
Contributor

vors commented Jun 3, 2016

I think it's worth at least merge it in a branch in the origin for future references and comparison.

@daviwil
Copy link
Contributor

daviwil commented Jun 8, 2016

Hey @gravejester, hate to have to ask you to do this, but do you mind closing this PR and creating a new one with the same changes? Apparently the CLA automation tool doesn't pick up existing PRs that were created before it gets added to a repo. Once you do that you'll be able to get the CLA signed so that I can merge the changes.

@gravejester
Copy link
Contributor Author

@daviwil No problem. Do you want me to create a new PR with the same commits, or should I just go straight for the new refactored file?

@daviwil
Copy link
Contributor

daviwil commented Jun 9, 2016

Whichever you prefer is fine with me!

@gravejester
Copy link
Contributor Author

Clossing this - created new PR

@gravejester gravejester closed this Jun 9, 2016
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.

5 participants