Skip to content

{WIP} (GH-812) Update folder for DSC style scripts #814

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

Conversation

glennsarti
Copy link
Contributor

Previously the code folding was not tested against DSC configuration scripts.
This commit;

  • Adds tests for a sample DSC script to ensure the folding occurs at the correct
    places
  • Adds an AST visitor for the ParamBlockAST object. This typically spans
    multiple lines. This commit also adds tests for this scenario

Builds on PR #806

Fixes #812

@glennsarti glennsarti requested a review from rjmholt as a code owner December 10, 2018 13:45
@glennsarti
Copy link
Contributor Author

Ping @SeeminglyScience This asserts that DSC scripts are ok with the folder.

@glennsarti glennsarti force-pushed the gh-812-folding-for-dsc branch 2 times, most recently from c7f439d to d937945 Compare December 12, 2018 05:57
The AST contains the most correct version of how a script is interpreted. This
includes regions of text. Currently the code folder only uses the Tokens which
requires the folder to re-implement some of the AST behaviour e.g. matching
token pairs for arrays etc.  The code folder should be implemented using as much
of the AST as possible.  This commit;

* Moves most of the region detection to use the AST Extents and uses a new
  FindFoldsASTVisitor.
* Modifies the tests and language server to use the new method fold detection
  class.
* Moved the code to modify the end line of folding regions to the language
  server code.
@glennsarti glennsarti force-pushed the gh-812-folding-for-dsc branch from d937945 to ebe7164 Compare December 12, 2018 14:09
Previously the code folding was not tested against DSC configuration scripts.
This commit;

* Adds tests for a sample DSC script to ensure the folding occurs at the correct
  places
* Adds an AST visitor for the ParamBlockAST object.  This typically spans
  multiple lines.  This commit also adds tests for this scenario
@glennsarti
Copy link
Contributor Author

Closed in preference to #853

@glennsarti glennsarti closed this Jan 21, 2019
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.

1 participant