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

Implement use of tree-sitter parser #241

Merged
merged 13 commits into from
Oct 26, 2023

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Oct 20, 2023

PR Summary

  • The primary change is to use the generated tree-sitter parser.
  • Grammar was updated to have parent node for arguments and member_access
  • Grammar updated so that string arguments don't include the quotes
  • The statement parser creates expression which can contain functions
  • Added base64 and concat functions for testing
  • Some clippy fixes as the rules appeared to have been updated

Note that this parser is not integrated yet with config. That will come next replacing resourceId() with real function.

tree-sitter-dscexpression/grammar.js Show resolved Hide resolved
dsc/src/resource_command.rs Outdated Show resolved Hide resolved
dsc/src/resource_command.rs Outdated Show resolved Hide resolved
dsc/src/subcommand.rs Outdated Show resolved Hide resolved
dsc/src/subcommand.rs Outdated Show resolved Hide resolved
dsc_lib/src/parser/functions.rs Outdated Show resolved Hide resolved
dsc_lib/src/parser/mod.rs Outdated Show resolved Hide resolved
dsc_lib/src/parser/mod.rs Outdated Show resolved Hide resolved
dsc_lib/src/parser/mod.rs Outdated Show resolved Hide resolved
registry/src/main.rs Outdated Show resolved Hide resolved
dsc_lib/src/parser/expressions.rs Outdated Show resolved Hide resolved
dsc_lib/src/parser/functions.rs Outdated Show resolved Hide resolved
dsc_lib/src/parser/functions.rs Outdated Show resolved Hide resolved
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Oct 26, 2023
Merged via the queue into PowerShell:main with commit d6acc1d Oct 26, 2023
4 checks passed
@SteveL-MSFT SteveL-MSFT deleted the tree-sitter-parse branch October 26, 2023 13:39
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.

None yet

2 participants