Skip to content

Support for SyntaxTrivia in the AST #1806

@adamdriscoll

Description

@adamdriscoll

Roslyn accomplishes this by having LeadingTrivia and TrailingTrivia collections for each token in the Syntax Tree. PowerShell doesn't maintain this type of trivia in the AST so refactoring algorithms have to take the AST and parsed tokens into account when processing and reordering a script.

I feel like I talked to @lzybkr about this at one point so there may be a good reason for not doing this that I don't remember but I figure it'd be a cool discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-No ActivityIssue has had no activity for 6 months or moreUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions