2727// / past.
2828// / - MustBeRegex: whether an error during lexing should be considered a regex
2929// / literal, or some thing else.
30- // / - BridgedOptionalDiagnosticEngine : RegexLiteralLexingFn should diagnose the
31- // / token using this engine.
30+ // / - OptionalDiagnosticEngine : RegexLiteralLexingFn should diagnose the
31+ // / token using this engine.
3232// /
3333// / Returns: A bool indicating whether lexing was completely erroneous, and
3434// / cannot be recovered from, or false if there either was no error,
3535// / or there was a recoverable error.
3636typedef bool (*RegexLiteralLexingFn)(
3737 /* CurPtrPtr*/ const char *_Nonnull *_Nonnull,
3838 /* BufferEnd*/ const char *_Nonnull,
39- /* MustBeRegex*/ bool , BridgedOptionalDiagnosticEngine );
39+ /* MustBeRegex*/ bool , swift::DiagnosticEngine *_Nullable );
4040void Parser_registerRegexLiteralLexingFn (RegexLiteralLexingFn _Nullable fn);
4141
4242// / Parse a regex literal string. Takes the following arguments:
@@ -48,16 +48,16 @@ void Parser_registerRegexLiteralLexingFn(RegexLiteralLexingFn _Nullable fn);
4848// / - CaptureStructureSize: The size of the capture structure buffer. Must be
4949// / greater than or equal to `strlen(InputPtr) + 3`.
5050// / - DiagnosticBaseLoc: Start location of the regex literal.
51- // / - BridgedDiagnosticEngine : RegexLiteralParsingFn should diagnose the
52- // / parsing errors using this engine.
51+ // / - DiagnosticEngine : RegexLiteralParsingFn should diagnose the
52+ // / parsing errors using this engine.
5353// /
5454// / Returns: A bool value indicating if there was an error while parsing.
5555typedef bool (*RegexLiteralParsingFn)(/* InputPtr*/ const char *_Nonnull,
5656 /* VersionOut*/ unsigned *_Nonnull,
5757 /* CaptureStructureOut*/ void *_Nonnull,
5858 /* CaptureStructureSize*/ unsigned ,
5959 /* DiagnosticBaseLoc*/ swift::SourceLoc,
60- BridgedDiagnosticEngine );
60+ swift::DiagnosticEngine & );
6161void Parser_registerRegexLiteralParsingFn (RegexLiteralParsingFn _Nullable fn);
6262
6363#endif // REGEX_PARSER_BRIDGING
0 commit comments