diff --git a/runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift b/runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift index 9db7e1de6..5f7f619bf 100644 --- a/runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift +++ b/runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift @@ -50,7 +50,7 @@ open class LexerATNSimulator: ATNSimulator { } - internal let recog: Lexer? + internal weak var recog: Lexer? /// /// The current token's starting index into the character stream. diff --git a/runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift b/runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift index fb0ce0341..ca58b56ef 100644 --- a/runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift +++ b/runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift @@ -250,7 +250,8 @@ open class ParserATNSimulator: ATNSimulator { } return false }() - internal final var parser: Parser + + internal final unowned let parser: Parser public final var decisionToDFA: [DFA]