From a462e06625c3e34e3921e28059684f4e65cb2553 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 28 Nov 2022 14:28:54 +0100 Subject: [PATCH] Rename ns.doc to res.doc. --- lib/4.06.1/unstable/js_compiler.ml | 2 +- lib/4.06.1/unstable/js_playground_compiler.ml | 8 ++++---- lib/4.06.1/whole_compiler.ml | 8 ++++---- res_syntax/src/res_core.ml | 6 +++--- res_syntax/src/res_printer.ml | 2 +- .../tests/idempotency/napkinscript/docComments.res | 2 +- res_syntax/tests/parsing/other/docComments.res | 4 ++-- .../tests/parsing/other/expected/docComments.res.txt | 12 ++++++------ res_syntax/tests/printer/comments/docComments.res | 4 ++-- .../printer/comments/expected/docComments.res.txt | 4 ++-- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/4.06.1/unstable/js_compiler.ml b/lib/4.06.1/unstable/js_compiler.ml index 63ca3a29582..e5217270362 100644 --- a/lib/4.06.1/unstable/js_compiler.ml +++ b/lib/4.06.1/unstable/js_compiler.ml @@ -58484,7 +58484,7 @@ and printPayload ~state (payload : Parsetree.payload) cmtTbl = and printAttribute ?(standalone = false) ~state ((id, payload) : Parsetree.attribute) cmtTbl = match (id, payload) with - | ( {txt = "ns.doc"}, + | ( {txt = "res.doc"}, PStr [ { diff --git a/lib/4.06.1/unstable/js_playground_compiler.ml b/lib/4.06.1/unstable/js_playground_compiler.ml index 7c0145367c0..1045312f2db 100644 --- a/lib/4.06.1/unstable/js_playground_compiler.ml +++ b/lib/4.06.1/unstable/js_playground_compiler.ml @@ -58484,7 +58484,7 @@ and printPayload ~state (payload : Parsetree.payload) cmtTbl = and printAttribute ?(standalone = false) ~state ((id, payload) : Parsetree.attribute) cmtTbl = match (id, payload) with - | ( {txt = "ns.doc"}, + | ( {txt = "res.doc"}, PStr [ { @@ -167535,7 +167535,7 @@ and parseStructureItemRegion p = Parser.next p; Some (Ast_helper.Str.attribute ~loc - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc @@ -168167,7 +168167,7 @@ and parseSignatureItemRegion p = Parser.next p; Some (Ast_helper.Sig.attribute ~loc - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc @@ -168382,7 +168382,7 @@ and parseAttribute p = | DocComment (loc, s) -> Parser.next p; Some - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc diff --git a/lib/4.06.1/whole_compiler.ml b/lib/4.06.1/whole_compiler.ml index 19438256099..ac2131242ba 100644 --- a/lib/4.06.1/whole_compiler.ml +++ b/lib/4.06.1/whole_compiler.ml @@ -113478,7 +113478,7 @@ and printPayload ~state (payload : Parsetree.payload) cmtTbl = and printAttribute ?(standalone = false) ~state ((id, payload) : Parsetree.attribute) cmtTbl = match (id, payload) with - | ( {txt = "ns.doc"}, + | ( {txt = "res.doc"}, PStr [ { @@ -180967,7 +180967,7 @@ and parseStructureItemRegion p = Parser.next p; Some (Ast_helper.Str.attribute ~loc - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc @@ -181599,7 +181599,7 @@ and parseSignatureItemRegion p = Parser.next p; Some (Ast_helper.Sig.attribute ~loc - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc @@ -181814,7 +181814,7 @@ and parseAttribute p = | DocComment (loc, s) -> Parser.next p; Some - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc diff --git a/res_syntax/src/res_core.ml b/res_syntax/src/res_core.ml index e0313ff78ad..245dc3f7c47 100644 --- a/res_syntax/src/res_core.ml +++ b/res_syntax/src/res_core.ml @@ -5543,7 +5543,7 @@ and parseStructureItemRegion p = Parser.next p; Some (Ast_helper.Str.attribute ~loc - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc @@ -6175,7 +6175,7 @@ and parseSignatureItemRegion p = Parser.next p; Some (Ast_helper.Sig.attribute ~loc - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc @@ -6390,7 +6390,7 @@ and parseAttribute p = | DocComment (loc, s) -> Parser.next p; Some - ( {txt = "ns.doc"; loc}, + ( {txt = "res.doc"; loc}, PStr [ Ast_helper.Str.eval ~loc diff --git a/res_syntax/src/res_printer.ml b/res_syntax/src/res_printer.ml index 2afc6973f6f..f7f288f7d11 100644 --- a/res_syntax/src/res_printer.ml +++ b/res_syntax/src/res_printer.ml @@ -5262,7 +5262,7 @@ and printPayload ~state (payload : Parsetree.payload) cmtTbl = and printAttribute ?(standalone = false) ~state ((id, payload) : Parsetree.attribute) cmtTbl = match (id, payload) with - | ( {txt = "ns.doc"}, + | ( {txt = "res.doc"}, PStr [ { diff --git a/res_syntax/tests/idempotency/napkinscript/docComments.res b/res_syntax/tests/idempotency/napkinscript/docComments.res index d25fd130ca8..ace1c4abcf7 100644 --- a/res_syntax/tests/idempotency/napkinscript/docComments.res +++ b/res_syntax/tests/idempotency/napkinscript/docComments.res @@ -1,7 +1,7 @@ /** This is a doc ✅ comment */ let z = 34 -@ns.doc("And this is a ns.doc ✅ annotation") +@res.doc("And this is a res.doc ✅ annotation") let q = 11 /** This diff --git a/res_syntax/tests/parsing/other/docComments.res b/res_syntax/tests/parsing/other/docComments.res index bd61bf3998d..2aec79b66cf 100644 --- a/res_syntax/tests/parsing/other/docComments.res +++ b/res_syntax/tests/parsing/other/docComments.res @@ -5,9 +5,9 @@ /** This is a doc ✅ comment */ let z = 34 -@@ns.doc("And this is a ns.doc module annotation") +@@res.doc("And this is a res.doc module annotation") -@ns.doc("And this is a ns.doc ✅ annotation") +@res.doc("And this is a res.doc ✅ annotation") let q = 11 /** This diff --git a/res_syntax/tests/parsing/other/expected/docComments.res.txt b/res_syntax/tests/parsing/other/expected/docComments.res.txt index ec70b0a74be..f8427fb3ff9 100644 --- a/res_syntax/tests/parsing/other/expected/docComments.res.txt +++ b/res_syntax/tests/parsing/other/expected/docComments.res.txt @@ -1,7 +1,7 @@ -[@@@ns.doc " This is a module comment "] -[@@@ns.doc " This is another module comment "] -let z = 34[@@ns.doc " This is a doc \226\156\133 comment "] -[@@@ns.doc {js|And this is a ns.doc module annotation|js}] -let q = 11[@@ns.doc {js|And this is a ns.doc ✅ annotation|js}] -type nonrec h = int[@@ns.doc +[@@@res.doc " This is a module comment "] +[@@@res.doc " This is another module comment "] +let z = 34[@@res.doc " This is a doc \226\156\133 comment "] +[@@@res.doc {js|And this is a res.doc module annotation|js}] +let q = 11[@@res.doc {js|And this is a res.doc ✅ annotation|js}] +type nonrec h = int[@@res.doc " This\n * is a multi-line\n multiline doc comment\n "] \ No newline at end of file diff --git a/res_syntax/tests/printer/comments/docComments.res b/res_syntax/tests/printer/comments/docComments.res index 23430dc701b..e3e667adb36 100644 --- a/res_syntax/tests/printer/comments/docComments.res +++ b/res_syntax/tests/printer/comments/docComments.res @@ -5,9 +5,9 @@ /** This is a doc ✅ comment */ let z = 34 -@@ns.doc("And this is a ns.doc module annotation") +@@res.doc("And this is a res.doc module annotation") -@ns.doc("And this is a ns.doc ✅ annotation") +@res.doc("And this is a res.doc ✅ annotation") let q = 11 /** This diff --git a/res_syntax/tests/printer/comments/expected/docComments.res.txt b/res_syntax/tests/printer/comments/expected/docComments.res.txt index 86a9cff2e05..6a6a951e976 100644 --- a/res_syntax/tests/printer/comments/expected/docComments.res.txt +++ b/res_syntax/tests/printer/comments/expected/docComments.res.txt @@ -5,9 +5,9 @@ /** This is a doc ✅ comment */ let z = 34 -/***And this is a ns.doc module annotation*/ +/***And this is a res.doc module annotation*/ -/**And this is a ns.doc ✅ annotation*/ +/**And this is a res.doc ✅ annotation*/ let q = 11 /** This