Files
codeql/swift/ql/test/extractor-tests/statements/LabeledStmts.expected
Paolo Tranquilli 946e1f498a Swift: generate getParent implementation
By explicitly marking children in the `schema.yml` file, an internal
`getAChild` predicate is implemented, that is in turn used in `AstNode`
to implement `getParent`.

This is yet to be used in the control flow library to replace the
hand-rolled implementation.

A further, more complex step is to use the same information to fully
generate the core implementation of `PrintAst` (including the
accessor string). This will be done later.

The `parent` tests use the same swift code as the extractor tests, and
this is currently enforced by `sync-files.py`. Notice that `qltest.sh`
had to be modified to deal with multiple files, which was not working
yet.
2022-06-01 14:32:58 +02:00

13 lines
671 B
Plaintext

| statements.swift:2:3:8:3 | for ... in ... { ... } |
| statements.swift:3:5:7:5 | if ... then { ... } else { ... } |
| statements.swift:10:3:12:3 | while ... { ... } |
| statements.swift:15:3:17:18 | repeat { ... } while ... |
| statements.swift:19:3:23:3 | do { ... } catch { ... } |
| statements.swift:25:3:31:3 | do { ... } catch { ... } |
| statements.swift:39:3:41:3 | guard ... else { ... } |
| statements.swift:48:1:50:1 | do { ... } |
| statements.swift:53:1:62:1 | switch index { ... } |
| statements.swift:65:1:66:1 | if ... then { ... } |
| statements.swift:67:1:68:1 | if ... then { ... } |
| statements.swift:71:1:72:1 | for ... in ... where ... { ... } |