You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the notice.
Note: If a change is required then that means we'd need to compile conditionally against PS v7 as well (at the moment v6 and v7 both work well together).
This and a couple of other changes in PS 7 will add AST types. Those will add new methods to ICustomAstVisitor2 and AstVisitor2, but they won't be breaking changes like they would have been in the past since .NET Core 3.0 allows default interface implementation and we provide those.
The real issue is if new or existing rules need to know about things like ternary expressions, modulo the fact that an unmodified AST visitor will still pick up subexpressions without issue.
For example, a rule that checks integer use in floating point expressions will be fine with 1 -gt 4 ? 3.0*3 : 4.0*1, since it will still see the three subexpressions.
But in a case where you have something like a rule that does something like try to infer the result of an assignment or an expression, we might need to add support.
The ternary operator will soon be added to the PowerShell language. Necessary updates may be needed for the PSSA:
TernaryExpressionAst
is added. Changes are made to the visitors in PowerShell. The visitors in PSSA may need to be updated too./cc @rjmholt
The text was updated successfully, but these errors were encountered: