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.
This commit is contained in:
Paolo Tranquilli
2022-05-30 17:24:19 +02:00
parent 6f9e9e889b
commit 946e1f498a
342 changed files with 4632 additions and 586 deletions

View File

@@ -25,7 +25,7 @@ repos:
- id: sync-files
name: Fix files required to be identical
files: \.(qll?|qhelp)$
files: \.(qll?|qhelp|swift)$
language: system
entry: python3 config/sync-files.py --latest
pass_filenames: false