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

(Replaced) PowerShell mode for CodeMirror #3910

Closed
wants to merge 23 commits into from

Conversation

ashmind
Copy link
Contributor

@ashmind ashmind commented Mar 27, 2016

This is a PowerShell mode for CodeMirror.
I've done it a while ago, so I don't remember all details, but the following should work well:

  1. Various literals
  2. Variables, including ${}
  3. Various operators
  4. String interpolation, including nested string interpolation
  5. Builtins (known variables and functions)

And I've just added some tests (around 94% code coverage).

Let me know if there are any issues.

VapidWorx and others added 23 commits June 7, 2013 14:08
…ns recognition).

New tests (large scripts).
More cleanup.
…ntact you, but please let me know if you have issues with this).
corrected digit matching regex
corrected spelling of 'identifier' in grammar dictionary
notCharacterOrDash explicitly includes lowercase characters
improved variable matching
splatted variables now match
bare '$' and '@' are errors, not variables
moved single-quoted string processing into tokenSingleQuoteString
incomplete strings are errors now
empty strings are no longer errors
added support for here-string interpolation with nesting support
added highlighting for splatted vars
removed arbitrary stream advancement prior to default error in tokenBase
enabled folding braces
@Dominator008
Copy link
Contributor

@ashmind Can you squash the commits? Thanks.

MT('keyword', "[keyword if]");

MT('call_builtin', "[builtin Get-ChildItem]");
})();
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs an additional newline afterwards.

@ashmind
Copy link
Contributor Author

ashmind commented Mar 27, 2016

@Dominator008 I thought about squashing them, but wouldn't that eliminate @benpmiller and @VapidWorx from the history?

@Dominator008
Copy link
Contributor

@ashmind Maybe squash into three / four commits?

@ashmind
Copy link
Contributor Author

ashmind commented Mar 27, 2016

@Dominator008 OK I'll try that.

@ashmind ashmind closed this Mar 27, 2016
@ashmind
Copy link
Contributor Author

ashmind commented Mar 27, 2016

@Dominator008 Please see #3911.

@ashmind ashmind changed the title PowerShell mode for CodeMirror (Replaced) PowerShell mode for CodeMirror Mar 27, 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.

4 participants