@@ -609,8 +609,7 @@ module Internal = {
609609 };
610610type node = {. "kind": SyntaxKind . t };
611611 [@ bs . module "typescript" ]
612- external createSourceFile :
613- (string , string , ScriptTarget . t , Js . boolean ) =>node =
612+ external createSourceFile : (string , string , ScriptTarget . t , bool ) =>node =
614613"" ;
615614};
616615
@@ -619,18 +618,18 @@ type parseDiagnostic = {
619618 messageText: string ,
620619 category: int ,
621620 length: int ,
622- code: int
621+ code: int ,
623622};
624623
625624type keyword = {
626625 pos: int ,
627- end_: int
626+ end_: int ,
628627}
629628and identifier = {
630629 pos: int ,
631630 end_: int ,
632631 escapedText: string ,
633- text: string
632+ text: string ,
634633}
635634and functionDeclaration = {
636635pos : int,
@@ -639,39 +638,39 @@ and functionDeclaration = {
639638 name: node,
640639 typeParameters: array(node),
641640 parameters: array(node),
642- type_: node
641+ type_: node,
643642}
644643and interfaceDeclaration= {
645644 pos: int,
646645 end_: int,
647646 modifiers: array(node),
648647 name: node,
649648 typeParameters: array(node),
650- members: array(node)
649+ members: array(node),
651650}
652651and propertySignature= {
653652 pos: int,
654653 end_: int,
655654 modifiers: array(node),
656655 name: node,
657656 questionToken: option(node),
658- type_: node
657+ type_: node,
659658}
660659and questionToken= {
661660 pos: int,
662- end_: int
661+ end_: int,
663662}
664663and typeAliasDeclaration= {
665664 pos: int,
666665 end_: int,
667666 name: node,
668667 typeParameters: array(node),
669- type_: node
668+ type_: node,
670669}
671670and typeLiteral= {
672671 pos: int,
673672 end_: int,
674- members: array(node)
673+ members: array(node),
675674}
676675and sourceFile= {
677676 pos: int,
@@ -684,25 +683,25 @@ and sourceFile = {
684683 statements: array(node),
685684 nodeCount: int,
686685 identifierCount: int,
687- parseDiagnostics: array(parseDiagnostic)
686+ parseDiagnostics: array(parseDiagnostic),
688687}
689688and parameter= {
690689 pos: int,
691690 end_: int,
692691 dotDotDotToken: option(node),
693692 name: node,
694693 questionToken: option(node),
695- type_: node
694+ type_: node,
696695}
697696and typeParameter= {
698697 pos: int,
699698 end_: int,
700- name: node
699+ name: node,
701700}
702701and typeReference= {
703702 pos: int,
704703 end_: int,
705- typeName: node
704+ typeName: node,
706705}
707706and node=
708707 |DeclareKeyword (keyword)
@@ -729,7 +728,7 @@ module Decoder = {
729728 messageText: json|> field("messageText" , string),
730729 category: json|> field("category" , int),
731730 code: json|> field("code" , int),
732- length: json|> field("length" , int)
731+ length: json|> field("length" , int),
733732 };
734733external nodeToJson : Internal . node =>Js . Json . t = "% identity " ;
735734let rec decoders = [
@@ -747,7 +746,7 @@ module Decoder = {
747746 (Internal . SyntaxKind . sourceFile, sourceFile),
748747 (Internal . SyntaxKind . parameter, parameter),
749748 (Internal . SyntaxKind . typeParameter, typeParameter),
750- (Internal . SyntaxKind . typeReference, typeReference)
749+ (Internal . SyntaxKind . typeReference, typeReference),
751750]
752751and node = json=> {
753752let syntaxKind = json|> Json . Decode . field("kind" , Json . Decode . int);
@@ -761,82 +760,85 @@ module Decoder = {
761760DeclareKeyword (
762761Json . Decode . {
763762 pos: json|> field("pos" , int),
764- end_: json|> field("end" , int)
765- }
763+ end_: json|> field("end" , int),
764+ },
766765 )
767766and exportKeyword = json=>
768767ExportKeyword (
769768Json . Decode . {
770769 pos: json|> field("pos" , int),
771- end_: json|> field("end" , int)
772- }
770+ end_: json|> field("end" , int),
771+ },
773772 )
774773and numberKeyword = json=>
775774NumberKeyword (
776775Json . Decode . {
777776 pos: json|> field("pos" , int),
778- end_: json|> field("end" , int)
779- }
777+ end_: json|> field("end" , int),
778+ },
780779 )
781780and stringKeyword = json=>
782781StringKeyword (
783782Json . Decode . {
784783 pos: json|> field("pos" , int),
785- end_: json|> field("end" , int)
786- }
784+ end_: json|> field("end" , int),
785+ },
787786 )
788787and identifier = json=>
789788Identifier (
790789Json . Decode . {
791790 pos: json|> field("pos" , int),
792791 end_: json|> field("end" , int),
793792 escapedText: json|> field("escapedText" , string),
794- text: json|> field("text" , string)
795- }
793+ text: json|> field("text" , string),
794+ },
796795 )
797796and functionDeclaration = json=>
798797FunctionDeclaration (
799798Json . Decode . {
800799 pos: json|> field("pos" , int),
801800 end_: json|> field("end" , int),
802- modifiers: json|> withDefault([||] , field("modifiers" , array(node))),
801+ modifiers:
802+ json|> withDefault([||] , field("modifiers" , array(node))),
803803 name: json|> field("name" , node),
804804 typeParameters:
805805 json|> withDefault([||] , field("typeParameters" , array(node))),
806806 parameters: json|> field("parameters" , array(node)),
807- type_: json|> field("type" , node)
808- }
807+ type_: json|> field("type" , node),
808+ },
809809 )
810810and interfaceDeclaration = json=>
811811InterfaceDeclaration (
812812Json . Decode . {
813813 pos: json|> field("pos" , int),
814814 end_: json|> field("end" , int),
815- modifiers: json|> withDefault([||] , field("modifiers" , array(node))),
815+ modifiers:
816+ json|> withDefault([||] , field("modifiers" , array(node))),
816817 name: json|> field("name" , node),
817818 members: json|> field("members" , array(node)),
818819 typeParameters:
819- json|> withDefault([||] , field("typeParameters" , array(node)))
820- }
820+ json|> withDefault([||] , field("typeParameters" , array(node))),
821+ },
821822 )
822823and propertySignature = json=>
823824PropertySignature (
824825Json . Decode . {
825826 pos: json|> field("pos" , int),
826827 end_: json|> field("end" , int),
827- modifiers: json|> withDefault([||] , field("modifiers" , array(node))),
828+ modifiers:
829+ json|> withDefault([||] , field("modifiers" , array(node))),
828830 name: json|> field("name" , node),
829831 type_: json|> field("type" , node),
830832 questionToken:
831- json|> Json . Decode . optional(field("questionToken" , node))
832- }
833+ json|> Json . Decode . optional(field("questionToken" , node)),
834+ },
833835 )
834836and questionToken = json=>
835837QuestionToken (
836838Json . Decode . {
837839 pos: json|> field("pos" , int),
838- end_: json|> field("end" , int)
839- }
840+ end_: json|> field("end" , int),
841+ },
840842 )
841843and typeAliasDeclaration = json=>
842844TypeAliasDeclaration (
@@ -846,16 +848,16 @@ module Decoder = {
846848 name: json|> field("name" , node),
847849 type_: json|> field("type" , node),
848850 typeParameters:
849- json|> withDefault([||] , field("typeParameters" , array(node)))
850- }
851+ json|> withDefault([||] , field("typeParameters" , array(node))),
852+ },
851853 )
852854and typeLiteral = json=>
853855TypeLiteral (
854856Json . Decode . {
855857 pos: json|> field("pos" , int),
856858 end_: json|> field("end" , int),
857- members: json|> field("members" , array(node))
858- }
859+ members: json|> field("members" , array(node)),
860+ },
859861 )
860862and sourceFile = json=>
861863SourceFile (
@@ -871,8 +873,8 @@ module Decoder = {
871873 nodeCount: json|> field("nodeCount" , int),
872874 identifierCount: json|> field("identifierCount" , int),
873875 parseDiagnostics:
874- json|> field("parseDiagnostics" , array(parseDiagnostic))
875- }
876+ json|> field("parseDiagnostics" , array(parseDiagnostic)),
877+ },
876878 )
877879and parameter = json=>
878880Parameter (
@@ -882,24 +884,24 @@ module Decoder = {
882884 dotDotDotToken: None ,
883885 name: json|> field("name" , node),
884886 questionToken: None ,
885- type_: json|> field("type" , node)
886- }
887+ type_: json|> field("type" , node),
888+ },
887889 )
888890and typeParameter = json=>
889891TypeParameter (
890892Json . Decode . {
891893 pos: json|> field("pos" , int),
892894 end_: json|> field("end" , int),
893- name: json|> field("name" , node)
894- }
895+ name: json|> field("name" , node),
896+ },
895897 )
896898and typeReference = json=>
897899TypeReference (
898900Json . Decode . {
899901 pos: json|> field("pos" , int),
900902 end_: json|> field("end" , int),
901- typeName: json|> field("typeName" , node)
902- }
903+ typeName: json|> field("typeName" , node),
904+ },
903905 )
904906and unknown = json=> {
905907let kind = Json . Decode . field("kind" , Json . Decode . int, json);
@@ -917,7 +919,7 @@ let parse = (fileName: string, source: string) => {
917919 fileName,
918920 source,
919921Internal . ScriptTarget . es2015,
920- Js . false_
922+ false ,
921923 );
922924Decoder . decode(sourceFile);
923925};