Skip to content

Commit 75a7bcd

Browse files
committed
Swift: add missing qlgen.py docstring
1 parent 9102cb5 commit 75a7bcd

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

swift/codegen/generators/qlgen.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1-
#!/usr/bin/env python3
2-
# TODO this should probably be split in different generators now: ql, qltest, maybe qlipa
1+
"""
2+
QL code generation
3+
4+
`generate(opts, renderer)` will generate in the library directory:
5+
* generated/Raw.qll with thin class wrappers around DB types
6+
* generated/Synth.qll with the base algebraic datatypes for AST entities
7+
* generated/<group>/<Class>.qll with generated properties for each class
8+
* if not already modified, a elements/<group>/<Class>.qll stub to customize the above classes
9+
* elements.qll importing all the above stubs
10+
* if not already modified, a elements/<group>/<Class>Constructor.qll stub to customize the algebraic datatype
11+
characteristic predicate
12+
* generated/SynthConstructors.qll importing all the above constructor stubs
13+
* generated/PureSynthConstructors.qll importing constructor stubs for pure synthesized types (that is, not
14+
corresponding to raw types)
15+
Moreover in the test directory for each <Class> in <group> it will generate beneath the
16+
extractor-tests/generated/<group>/<Class> directory either
17+
* a `MISSING_SOURCE.txt` explanation file if no `swift` source is present, or
18+
* one `<Class>.ql` test query for all single properties and on `<Class>_<property>.ql` test query for each optional or
19+
repeated property
20+
"""
21+
# TODO this should probably be split in different generators now: ql, qltest, maybe qlsynth
322

423
import logging
524
import pathlib

0 commit comments

Comments
 (0)