A small menubar app that allows you to switch between R versions quickly (if you have multiple versions of R framework installed).
https://rud.is/rswitch
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
879 B
43 lines
879 B
5 years ago
|
//
|
||
|
// ParseError.swift
|
||
|
// SwiftSoup
|
||
|
//
|
||
|
// Created by Nabil Chatbi on 19/10/16.
|
||
|
// Copyright © 2016 Nabil Chatbi.. All rights reserved.
|
||
|
//
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
/**
|
||
|
* A Parse Error records an error in the input HTML that occurs in either the tokenisation or the tree building phase.
|
||
|
*/
|
||
|
open class ParseError {
|
||
|
private let pos: Int
|
||
|
private let errorMsg: String
|
||
|
|
||
|
init(_ pos: Int, _ errorMsg: String) {
|
||
|
self.pos = pos
|
||
|
self.errorMsg = errorMsg
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Retrieve the error message.
|
||
|
* @return the error message.
|
||
|
*/
|
||
|
open func getErrorMessage() -> String {
|
||
|
return errorMsg
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Retrieves the offset of the error.
|
||
|
* @return error offset within input
|
||
|
*/
|
||
|
open func getPosition() -> Int {
|
||
|
return pos
|
||
|
}
|
||
|
|
||
|
open func toString() -> String {
|
||
|
return "\(pos): " + errorMsg
|
||
|
}
|
||
|
}
|