Commit Graph

12 Commits

Author SHA1 Message Date
Freddy Kellison-Linn 45505b87a5 Implement async defer
Use closure for defer body

Revert to main

Rework implementation to keep FuncDecl

Add AST briding

Add test with async let

Add main actor tests

Add additional tests
2026-03-14 17:47:51 -04:00
Elsa Keirouz d54a572f7f [Sema] desugar ForEachStmt at AST level 2026-01-23 15:17:29 +00:00
Anthony Latsis 9001ce4687 Bridging: Bridge swift::SourceRange directly 2025-07-15 21:33:28 +01:00
Anthony Latsis 6eb5d7d857 Bridging: Bridge swift::SourceLoc directly 2025-07-15 21:33:06 +01:00
Anthony Latsis 0e0fbc4160 Bridging: Bridge swift::Identifier directly 2025-07-10 17:58:13 +01:00
Rintaro Ishizaki ac80775201 [ASTGen] Generate miscellaneous builtin pound
`#error`, `#warning`, and `#assert`.
Also #_hasSymbol statement condition
2025-03-13 20:28:46 -07:00
Rintaro Ishizaki ae5f0f1626 [ASTGen][NFC] Remove unused variable
There was a compiler warning `unused variable 'context'`
2025-03-11 13:27:19 -07:00
Rintaro Ishizaki 5eac58e1e0 [AST] SwitchStmt only hold CaseStmt
Now that there is no way SwitchStmt to hold AST nodes other than
CaseStmt.
2025-03-08 09:14:40 -08:00
Doug Gregor 50801f9c05 [SE-0458] Implement "unsafe" effect for the for-in loop
Memory unsafety in the iteration part of the for-in loop (i.e., the part
that works on the iterator) can be covered by the "unsafe" effect on
the for..in loop, before the pattern.
2025-02-23 22:50:39 -08:00
Rintaro Ishizaki 6ea6a31ec7 [ASTGen] Generate TopLevelCodeDecl for PatternBindingDecl
* Instead of hoisting VarDecl in the bridging functions, do it in
  ASTGen.
* Introduce `Decl::forEachDeclToHoist` to handle VarDecls in
  PatternBindingDecl, and EnumElementDecl in EnumCaseDecl.
* Intorduce `withBridgedSwiftClosure(closure:call:)` as a callback
  mechanism between Swift and C++
* In `generate(sourceFile:)`, instead of using `generate(codeBlockItem:)`
  handle `CodeBlockItemSyntax.Item` manually to handle `TLCD` wrapping
  and `VarDecl` hoisting.
* Make `generate(variableDecl:)` handle TLCD correctly.
2025-02-13 00:09:22 -08:00
Rintaro Ishizaki c56dd2efca [ASTGen] Generate miscellaneous availability related nodes
* `@_specialize` with `availability:` arguments
* `@backDeployed` attributes
* `@_originallyDefinedIn` attributes
* `#available()` and `#unavailable()` statement conditions
2025-02-07 10:01:07 -08:00
Rintaro Ishizaki b5859240ab [ASTGen] Split ASTBridging.cpp into multiple files
ASTBridging.cpp was getting too big.
2024-10-04 10:48:56 -07:00