public ErrorRecoveryException(ErrorRecoveryScope scope) { if (scope == null) { throw new ArgumentNullException(nameof(scope)); } Scope = scope; }
private bool CanRecoverInParentScope(TokenKind kind, string text, out ErrorRecoveryScope recoveryScope) { foreach (var scope in recoveryScopes_) { if (scope.CanRecover(kind, text)) { recoveryScope = scope; return(true); } } recoveryScope = null; return(false); }