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

Enable multiline string support in tree-sitter gammar #524

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Aug 21, 2024

PR Summary

The grammar did not allow for newlines so each newline had the tree-sitter parser evaluate it as a new statement which was wrong. The change in the grammar is:

  • allow newlines and spaces anywhere
  • explicitly allow literal strings to contain newlines
  • also fixed it so strings can contain escaped single quotes

Updated tree-sitter tests and added example of WinPS Script resource with multi-line

PR Context

Fix #518

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Aug 21, 2024
Merged via the queue into PowerShell:main with commit d6d4b26 Aug 21, 2024
5 checks passed
@SteveL-MSFT SteveL-MSFT deleted the multiline branch August 21, 2024 22:35
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.

Multi-string support
2 participants