Skip to content

Conversation

@michaelblyons
Copy link
Collaborator

@michaelblyons michaelblyons commented Dec 5, 2025

Please test if you are so inclined!

This is mostly organization and restriction of scopes according to a distinguishing of expressions and a new statements context. All pre-existing tests pass, but there may be bugs that we didn't have tests for.

New

  • Grouping of syntax rules within the file
  • Classes have full body scope
  • Functions have full body scope
  • Desired State Configuration (DSC) contexts
  • Workflow contexts
  • Embed C# in here-strings if a couple common patterns are detected
  • True/False/Null get extended scopes
  • Simple string format placeholders

Changed

  • Many context names are pluralized, indicating that they will match multiple occurrences of their matches
  • A new statements context restricts some contexts that were being nested everywhere. This is the most likely place to find bugs.
  • Types have been sorted into builtin aliases (some may be missing) and formal types
  • using imports can now only come at the top of the file, as the docs specify.
  • Variables can now be named according to the insane official support.
  • Strings can be quoted with curly quotes if you're a masochist.

Maybe

  • Better wildcard scoping
  • More complex string format placeholders
  • Context-aware flow controls
  • Fully-recognized command expressions (i.e. no longer require Verb-Noun because we know it must be a command) See Loosen command restrictions #205

@michaelblyons michaelblyons mentioned this pull request Dec 5, 2025
13 tasks
Rather than triggering on Add-Type
@michaelblyons
Copy link
Collaborator Author

@matteocoder Do you want to give this a try? Let me know if there are big regressions.

I think this language was written by trolls.
@michaelblyons michaelblyons marked this pull request as ready for review December 8, 2025 20:33
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.

Fix scope for "using" arguments

1 participant