C#: Analysis change notes.

This commit is contained in:
Calum Grant
2019-05-24 12:35:14 +01:00
parent 14147a1abe
commit fe6056b0fc

View File

@@ -18,13 +18,15 @@
* The class `Attribute` has two new predicates: `getConstructorArgument()` and `getNamedArgument()`. The first predicate returns arguments to the underlying constructor call and the latter returns named arguments for initializing fields and properties.
* The following QL classes have been added to model C# 8 features:
- Class `IndexExpr` models from end index expressions, for example `^1`
- Class `IsRecursivePatternExpr` models `is` recursive patterns, for example `s is string { Length: 0 }`
- Class `PatternExpr` is an `Expr` that appears in a pattern. It has the new subclasses `DiscardPatternExpr`, `LabeledPatternExpr`, `RecursivePatternExpr`, `TypeAccessPatternExpr`, `TypePatternExpr`, and `VariablePatternExpr`.
- Class `PatternMatch` models a pattern being matched. It has the subclasses `Case` and `IsExpr`.
- Class `PositionalPatternExpr` models position patterns, for example `(int x, int y)`
- Class `PropertyPatternExpr` models property patterns, for example `Length: int len`
- Class `RangeExpr` models range expressions, for example `1..^1`
- Class `RecursivePatternCase` models `case` statements using recursive patterns, for example `case string { Length: 0 } x:`
- Class `RecursivePatternExpr` models recursive patterns, for example `string { Length: 0 }`
- Class `SwitchCaseExpr` models the arm of a switch expression, for example `(false, false) => true`
- Class `SwitchExpr` models `switch` expressions, for example `(a, b) switch { ... }`
- Classes `IsConstantExpr`, `IsTypeExpr` and `IsPatternExpr` are deprecated in favour of `IsExpr`
- Class `Switch` models both `SwitchExpr` and `SwitchStmt`
- Class `Case` models both `CaseStmt` and `SwitchCaseExpr`
## Changes to autobuilder