Files
swift-mirror/include/swift/Parse/ParseBridging.h
Erik Eckstein ed67e36ce5 bridging: reduce #ifdef USED_IN_CPP_SOURCE in bridging headers
Especially avoid any constructors in `#ifdef USED_IN_CPP_SOURCE` blocks, because this breaks Windows ARM64.
2024-10-25 09:47:56 +02:00

58 lines
2.0 KiB
C++

//===--- ParseBridging.h --------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_PARSE_PARSEBRIDGING_H
#define SWIFT_PARSE_PARSEBRIDGING_H
#include "swift/AST/ASTBridging.h"
#include "swift/Basic/BasicBridging.h"
namespace swift {
class Parser;
}
SWIFT_BEGIN_NULLABILITY_ANNOTATIONS
class BridgedLegacyParser {
swift::Parser *_Nonnull const handle;
public:
BridgedLegacyParser(swift::Parser &P) : handle(&P) {}
swift::Parser &unbridged() const { return *handle; }
};
SWIFT_NAME("BridgedLegacyParser.parseExpr(self:_:_:_:)")
BridgedExpr BridgedLegacyParser_parseExpr(BridgedLegacyParser,
BridgedSourceLoc loc,
BridgedDeclContext DC,
bool isExprBasic);
SWIFT_NAME("BridgedLegacyParser.parseDecl(self:_:_:)")
BridgedDecl BridgedLegacyParser_parseDecl(BridgedLegacyParser,
BridgedSourceLoc loc,
BridgedDeclContext DC);
SWIFT_NAME("BridgedLegacyParser.parseStmt(self:_:_:)")
BridgedStmt BridgedLegacyParser_parseStmt(BridgedLegacyParser,
BridgedSourceLoc loc,
BridgedDeclContext DC);
SWIFT_NAME("BridgedLegacyParser.parseType(self:_:_:)")
BridgedTypeRepr BridgedLegacyParser_parseType(BridgedLegacyParser,
BridgedSourceLoc loc,
BridgedDeclContext DC);
SWIFT_END_NULLABILITY_ANNOTATIONS
#endif // SWIFT_PARSE_PARSEBRIDGING_H