Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ANTLRError.nullPointer from the Swift runtime. #2052

Merged
merged 1 commit into from
Oct 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion runtime/Swift/Sources/Antlr4/CharStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public protocol CharStream: IntStream {
/// - parameter interval: an interval within the stream
/// - returns: the text of the specified interval
///
/// - throws: _ANTLRError.nullPointer_ if `interval` is `null`
/// - throws: _ANTLRError.illegalArgument_ if `interval.a < 0`, or if
/// `interval.b < interval.a - 1`, or if `interval.b` lies at or
/// past the end of the stream
Expand Down
2 changes: 0 additions & 2 deletions runtime/Swift/Sources/Antlr4/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ open class Parser: Recognizer<ParserATNSimulator> {
///
/// - Parameter listener: the listener to add
///
/// - Throws: _ANTLRError.nullPointer_ if listener is `null`
///
public func addParseListener(_ listener: ParseTreeListener) {
if _parseListeners == nil {
_parseListeners = Array<ParseTreeListener>()
Expand Down
3 changes: 0 additions & 3 deletions runtime/Swift/Sources/Antlr4/Recognizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ open class Recognizer<ATNInterpreter:ATNSimulator> {
return "\(s)"
}

///
/// - Throws: ANTLRError.nullPointer if `listener` is `null`.
///
open func addErrorListener(_ listener: ANTLRErrorListener) {

_listeners.append(listener)
Expand Down
1 change: 0 additions & 1 deletion runtime/Swift/Sources/Antlr4/TokenStream.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public protocol TokenStream: IntStream {
///
/// - Parameter interval: The interval of tokens within this stream to get text
/// for.
/// - Throws: ANTLRError.nullPointer if `interval` is `null`
/// - Returns: The text of all tokens within the specified interval in this
/// stream.
///
Expand Down
4 changes: 0 additions & 4 deletions runtime/Swift/Sources/Antlr4/misc/BitSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ import Foundation
/// implementation. The length of a bit set relates to logical length
/// of a bit set and is defined independently of implementation.
///
/// Unless otherwise noted, passing a null parameter to any of the
/// methods in a `BitSet` will result in a
/// `ANTLRError.nullPointer`.
///
/// A `BitSet` is not safe for multithreaded use without
/// external synchronization.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import Foundation

public enum ANTLRError: Error {
case nullPointer(msg:String)
case unsupportedOperation(msg:String)
case indexOutOfBounds(msg:String)
case illegalState(msg:String)
Expand Down