openFileSession
fun PrologParser.openFileSession(file: Any, initialOperators: OperatorTable = OperatorTables.empty(), sourceId: String? = file.asDynamic().name as? String, maximumRetainedTokens: Int? = null): SuspendingPrologParseSession
Opens a UTF-8 suspending parse session over a browser File or Blob.
The object must provide stream(); a file name is used as sourceId when available. Closing the returned session cancels unfinished reads and releases the stream reader lock.
Throws
if maximumRetainedTokens is not positive