Tom Hvitved
4ab5a1a060
Swift: Run code generator
2024-09-16 13:40:02 +02:00
Tom Hvitved
4912ee8ab3
Swift: Make Callable a sub type of AstNode
2024-09-13 15:39:40 +02:00
Paolo Tranquilli
b8e38288e3
Swift: add extraction of ThenStmt
...
These are currently added implicitly by the compiler in the context of
`if`/`switch` expressions. In the future, there might be explicit
`then <expr>` statement useful for cases where one would like to add
more than one statement in the branch, to mark what value to actually
use.
See https://forums.swift.org/t/pitch-multi-statement-if-switch-do-expressions/68443
2024-03-27 13:26:04 +01:00
Robert Marsh
3492b4820a
Swift: extract types for patterns
2023-11-29 20:54:50 +00:00
Alex Denisov
6a673e700b
Swift: extract DiscardStmt
2023-11-24 09:46:01 +01:00
Alex Denisov
5cd74213cc
Swift: extract MaterizliePackExpr
2023-11-24 09:45:01 +01:00
Alex Denisov
8b126fe51a
Swift: extract MacroDecl
2023-11-15 14:07:45 +01:00
Alex Denisov
002f2a0985
Swift: extract BorrowExpr
2023-11-13 15:55:37 +01:00
Alex Denisov
d21e27c717
Swift: extract ConsumeExpr
2023-11-13 15:55:37 +01:00
Alex Denisov
30e4822fb7
Swift: extract CopyExpr
2023-11-13 15:55:37 +01:00
Alex Denisov
e865c3cbd3
Swift: extract parameter packs
2023-11-10 10:20:14 +01:00
Alex Denisov
33de177fea
Swift: extract SingleValueStmtExpr
2023-11-07 13:40:35 +01:00
Paolo Tranquilli
f22d60f011
Swift: clean up VarDecl, NamedPattern and SwitchStmt interactions
...
* `variables` under `CaseStmt` are now AST children, which solves
orphan `VarDecl`s in that case
* reordered `CaseStmt` AST children to be `labels > variables > body`
(was `body > labels`)
* made `NamedPattern::getVarDecl` an extracted property instead of
`getName`
* The above led to duplicate DB entities because of a quirk in the
Swift compiler code. This is solved by tweaking the extraction of
`variables` under `CaseStmt` to not use `getCaseBodyVariables`.
2023-10-23 17:36:42 +02:00
Paolo Tranquilli
d55289bf68
Swift: add children to UnspecifiedElement
...
This will allow better downgrade scripts in the future.
2023-10-18 16:42:04 +02:00
Robert Marsh
ae1072e09f
Merge branch 'main' into rdmarsh2/swift/for-in
2023-09-26 15:12:46 +00:00
Paolo Tranquilli
4d3aecfff6
Swift: rename base_types to syntactic_base_types in TypeDecl
2023-09-14 10:03:52 +02:00
Robert Marsh
a3e250aef5
Swift: extract iterator variable for for-in loops
2023-09-08 19:08:57 +00:00
Alex Denisov
e9fdbfabea
Swift: extract nextCall from ForEachStmt
2023-08-22 17:36:40 +02:00
Paolo Tranquilli
396b57696c
Swift: minimal 5.8 compatibility
2023-06-14 16:17:44 +02:00
Paolo Tranquilli
9a0f87434e
Swift: remove unneeded properties from InterpolatedStringLiteralExpr
...
These properties were unused in the QL library (hence the full
upgrade/downgrade compatibility).
2023-05-22 15:28:54 +02:00
Nora Dimitrijević
2d9295a5a4
Swift: [generated] library code changes
2023-04-26 15:47:20 +02:00
Alexandre Boulgakov
35a2d55d18
Swift: Extract structured keypath components.
...
Changes in swift/ql/lib are generated by swift/codegen without manual intervention.
2023-04-11 13:34:17 +01:00
Paolo Tranquilli
6f6d3f1262
Merge branch 'main' into redsun82/swift-imported-modules-as-set
2023-03-30 16:42:35 +02:00
Geoffrey White
d8703210dd
Swift: Extract type aliases.
2023-03-29 15:49:12 +01:00
Paolo Tranquilli
20128adee4
Swift: make imported and exported modules a set
2023-03-29 15:44:07 +02:00
Paolo Tranquilli
a131966066
Swift: make SuccessfullyExtractedFiles.ql more precise
...
This is done by adding a `isSuccessfullyExtracted` predicate that is
filled for primary files at the very end of the extractor invocation if
the frontend was performed successfully. If for example the extractor
crashes this will therefore not be filled.
The upgrade script is written so that `SuccessfullyExtractedFiles.ql`
on an upgraded script will give exactly the same results as before it.
2023-03-20 08:34:34 +01:00
Paolo Tranquilli
f2dff092dc
Swift: remove parameter labels from function types
...
As discussed [in this accepted proposal][1], parameter labels do not
take part any more in making up a function type, so we need to not
extract them any more to avoid DB inconsistencies.
These were unused in the library, which makes the upgrade and downgrade
scripts have full compatibility.
[1]: 9c53790a13/proposals/0111-remove-arg-label-type-significance.md
2023-03-17 10:22:02 +01:00
Paolo Tranquilli
54b6c6f8f7
Swift: make AnyGenericType::getDecl's type more specific
...
As shown by the extractor's code not needing any change, the DB values
already had that more specific type, which is why the upgrade/downgrade
scripts are actually no-ops.
2023-03-14 11:49:07 +01:00
Alex Denisov
712c25e6f4
Swift: extract availability info
2023-02-07 14:26:39 +01:00
Paolo Tranquilli
a244b825df
Merge branch 'main' into redsun82/swift-regex
2023-02-07 09:37:09 +01:00
Nora Dimitrijević
50e5b29eb7
Swift: all Callables can have captures [codegen'd]
2023-02-02 11:56:51 +01:00
Nora Dimitrijević
d230431006
Swift: extract closure captures (codegen'd part)
2023-02-02 11:35:49 +01:00
Nora Dimitrijević
9a5614e8c5
Swift: subsume IterableDeclContext into Decl [codegen'd]
2023-01-28 00:44:49 +01:00
Paolo Tranquilli
f6e26211f9
Swift: add protocols to ExtensionDecl schema
2023-01-17 12:54:50 +01:00
Nora Dimitrijević
6269e6b24d
Swift: move getName to Callable (generated)
...
Now that getStaticTarget returns a Callable.
2022-12-14 14:30:33 -05:00
Paolo Tranquilli
fb5b6eab19
Swift: extract RegexLiteralExpr
2022-12-14 09:12:07 +01:00
Alex Denisov
f618d53302
Swift: add new implicit conversion
2022-11-30 12:40:34 +01:00
Nora Dimitrijević
931173350f
Swift: extract missing cases of AccessorKind and AccessSemantics
...
This resolves the warnings that were showing up during extractor-pack
compilation.
2022-11-29 11:31:07 +01:00
Paolo Tranquilli
a3d33e27e2
Swift: ignore IPA classes in dbscheme
2022-11-16 11:39:10 +01:00
Paolo Tranquilli
eb14348153
Merge branch 'main' into redsun82/swift-error-element
2022-11-11 14:36:02 +01:00
Paolo Tranquilli
d3ff4908e6
Merge branch 'main' into redsun82/swift-error-element
2022-11-11 14:05:47 +01:00
Paolo Tranquilli
3816361c15
Merge branch 'main' into redsun82/swift-types
2022-11-11 13:54:12 +01:00
Paolo Tranquilli
85233b3cbf
Swift: add new children to VarDecl
2022-11-11 12:34:40 +01:00
Paolo Tranquilli
88dc65cb3c
Swift: extract or ignore last remaining types
2022-11-10 17:38:32 +01:00
Paolo Tranquilli
c5bb32d6d2
Swift: create common ErrorElement superclass
2022-11-10 16:20:28 +01:00
Paolo Tranquilli
e26e0ec809
Swift: remove imposible nodes from schema
...
We don't expect these AST types to really appear during an extraction
run, even in an unsuccessful compilation.
2022-11-10 15:26:55 +01:00
Paolo Tranquilli
edfecddca1
Swift: extract AppliedPropertyWrapperExpr
2022-11-10 12:55:28 +01:00
Paolo Tranquilli
28c9d6b6b5
Swift: extract PropertyWrapperValuePlaceholderExpr
2022-11-10 11:28:05 +01:00
Paolo Tranquilli
0ccf81e67c
Swift: extract UnresolvedSpecializeExpr
2022-11-09 16:42:22 +01:00
Paolo Tranquilli
4770ad3177
Swift: extract OverloadedDeclRefExpr
2022-11-09 16:06:23 +01:00