Reason

public enum Reason
extension SyntaxError.Reason: CustomStringConvertible

The reason for the syntax error

  • emptyNotAllowed: An empty string was provided but the grammar does not allow empty productions
  • unknownToken: The tokenization could not be completed because no matching token was found
  • unmatchedPattern: A pattern was found which could not be merged
  • unexpectedToken: A token was found that was not expected
  • An empty string was provided but the grammar does not allow empty productions

    Declaration

    Swift

    case emptyNotAllowed
  • The tokenization could not be completed because no matching token was found

    Declaration

    Swift

    case unknownToken
  • A pattern was found which could not be merged

    Declaration

    Swift

    case unmatchedPattern
  • A token was found that was not expected

    Declaration

    Swift

    case unexpectedToken
  • Declaration

    Swift

    public var description: String { get }