Parser

public enum Parser

Parser to parse a string of a file into a Ledger

  • Parses a given file into a Ledger

    Throws

    Exceptions from opening the file

    Declaration

    Swift

    public static func parse(contentOf path: URL) throws -> Ledger

    Parameters

    contentOf

    URL to parse Encoding has to be UTF-8

    Return Value

    Ledger with parsed content

  • Parses a given String into a Ledger

    Declaration

    Swift

    public static func parse(string: String) -> Ledger

    Parameters

    string

    String to parse

    Return Value

    Ledger with parsed content