Module Js_parser.Parse_error

type t =
  1. | EnumBooleanMemberNotInitialized of {
    1. enum_name: string,
    2. member_name: string,
    }
  2. | EnumDuplicateMemberName of {
    1. enum_name: string,
    2. member_name: string,
    }
  3. | EnumInconsistentMemberValues of {
    1. enum_name: string,
    }
  4. | EnumInvalidExplicitType of {
    1. enum_name: string,
    2. supplied_type: option(string),
    }
  5. | EnumInvalidExport
  6. | EnumInvalidInitializerSeparator of {
    1. member_name: string,
    }
  7. | EnumInvalidMemberInitializer of {
    1. enum_name: string,
    2. explicit_type: option(Enum_common.explicit_type),
    3. member_name: string,
    }
  8. | EnumInvalidMemberName of {
    1. enum_name: string,
    2. member_name: string,
    }
  9. | EnumInvalidMemberSeparator
  10. | EnumInvalidEllipsis of {
    1. trailing_comma: bool,
    }
  11. | EnumNumberMemberNotInitialized of {
    1. enum_name: string,
    2. member_name: string,
    }
  12. | EnumStringMemberInconsistentlyInitailized of {
    1. enum_name: string,
    }
  13. | Unexpected(string)
  14. | UnexpectedWithExpected(string, string)
  15. | UnexpectedTokenWithSuggestion(string, string)
  16. | UnexpectedReserved
  17. | UnexpectedReservedType
  18. | UnexpectedSuper
  19. | UnexpectedSuperCall
  20. | UnexpectedEOS
  21. | UnexpectedVariance
  22. | UnexpectedStatic
  23. | UnexpectedProto
  24. | UnexpectedTypeAlias
  25. | UnexpectedOpaqueTypeAlias
  26. | UnexpectedTypeAnnotation
  27. | UnexpectedTypeDeclaration
  28. | UnexpectedTypeImport
  29. | UnexpectedTypeExport
  30. | UnexpectedTypeInterface
  31. | UnexpectedSpreadType
  32. | UnexpectedExplicitInexactInObject
  33. | InexactInsideExact
  34. | InexactInsideNonObject
  35. | NewlineAfterThrow
  36. | InvalidFloatBigInt
  37. | InvalidSciBigInt
  38. | InvalidRegExp
  39. | InvalidRegExpFlags(string)
  40. | UnterminatedRegExp
  41. | InvalidLHSInAssignment
  42. | InvalidLHSInExponentiation
  43. | InvalidLHSInForIn
  44. | InvalidLHSInForOf
  45. | InvalidIndexedAccess of {
    1. has_bracket: bool,
    }
  46. | InvalidOptionalIndexedAccess
  47. | ExpectedPatternFoundExpression
  48. | MultipleDefaultsInSwitch
  49. | NoCatchOrFinally
  50. | UnknownLabel(string)
  51. | Redeclaration(string, string)
  52. | IllegalContinue
  53. | IllegalBreak
  54. | IllegalReturn
  55. | IllegalUnicodeEscape
  56. | StrictModeWith
  57. | StrictCatchVariable
  58. | StrictVarName
  59. | StrictParamName
  60. | StrictParamDupe
  61. | StrictParamNotSimple
  62. | StrictFunctionName
  63. | StrictOctalLiteral
  64. | StrictNonOctalLiteral
  65. | StrictDelete
  66. | StrictDuplicateProperty
  67. | AccessorDataProperty
  68. | AccessorGetSet
  69. | InvalidTypeof
  70. | StrictLHSAssignment
  71. | StrictLHSPostfix
  72. | StrictLHSPrefix
  73. | StrictReservedWord
  74. | JSXAttributeValueEmptyExpression
  75. | InvalidJSXAttributeValue
  76. | ExpectedJSXClosingTag(string)
  77. | NoUninitializedConst
  78. | NoUninitializedDestructuring
  79. | NewlineBeforeArrow
  80. | FunctionAsStatement of {
    1. in_strict_mode: bool,
    }
  81. | AsyncFunctionAsStatement
  82. | GeneratorFunctionAsStatement
  83. | AdjacentJSXElements
  84. | ParameterAfterRestParameter
  85. | ElementAfterRestElement
  86. | PropertyAfterRestElement
  87. | DeclareAsync
  88. | DeclareClassElement
  89. | DeclareClassFieldInitializer
  90. | DeclareOpaqueTypeInitializer
  91. | DeclareExportLet
  92. | DeclareExportConst
  93. | DeclareExportType
  94. | DeclareExportInterface
  95. | DuplicateExport(string)
  96. | UnsupportedDecorator
  97. | MissingTypeParamDefault
  98. | DuplicateDeclareModuleExports
  99. | AmbiguousDeclareModuleKind
  100. | GetterArity
  101. | SetterArity
  102. | InvalidNonTypeImportInDeclareModule
  103. | ImportTypeShorthandOnlyInPureImport
  104. | ImportSpecifierMissingComma
  105. | ExportSpecifierMissingComma
  106. | MalformedUnicode
  107. | DuplicateConstructor
  108. | DuplicatePrivateFields(string)
  109. | InvalidClassMemberName of {
    1. name: string,
    2. static: bool,
    3. method_: bool,
    4. private_: bool,
    }
  110. | PrivateDelete
  111. | UnboundPrivate(string)
  112. | PrivateNotInClass
  113. | SuperPrivate
  114. | YieldInFormalParameters
  115. | AwaitAsIdentifierReference
  116. | YieldAsIdentifierReference
  117. | AmbiguousLetBracket
  118. | LiteralShorthandProperty
  119. | ComputedShorthandProperty
  120. | MethodInDestructuring
  121. | TrailingCommaAfterRestElement
  122. | OptionalChainNew
  123. | OptionalChainTemplate
  124. | NullishCoalescingUnexpectedLogical(string)
  125. | WhitespaceInPrivateName
  126. | ThisParamAnnotationRequired
  127. | ThisParamMustBeFirst
  128. | ThisParamMayNotBeOptional
  129. | GetterMayNotHaveThisParam
  130. | SetterMayNotHaveThisParam
  131. | ThisParamBannedInArrowFunctions
  132. | ThisParamBannedInConstructor
;
let compare: t => t => int;
exception Error((Loc.t, t), list((Loc.t, t)));
let error: Loc.t => t => 'a;
module PP: { ... };