Skip to content

Rename @ns.* to @res.* in parser/printer and outcome printer. #5862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename ns.iflet to res.iflet
  • Loading branch information
cristianoc committed Nov 28, 2022
commit 2d55b3282f464e96e7bf8e9d5de09581bd8d24c7
8 changes: 4 additions & 4 deletions lib/4.06.1/unstable/js_compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49873,7 +49873,7 @@ let filterParsingAttrs attrs =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "res.braces" | "ns.iflet" | "ns.namedArgLoc"
( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "ns.namedArgLoc"
| "res.optional" | "res.ternary" | "res.async" | "res.await"
| "res.template" );
},
Expand Down Expand Up @@ -50000,7 +50000,7 @@ let flattenableOperators parentOperator childOperator =
let rec hasIfLetAttribute attrs =
match attrs with
| [] -> false
| ({Location.txt = "ns.iflet"}, _) :: _ -> true
| ({Location.txt = "res.iflet"}, _) :: _ -> true
| _ :: attrs -> hasIfLetAttribute attrs

let isIfLetExpr expr =
Expand All @@ -50022,7 +50022,7 @@ let hasAttributes attrs =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "res.braces" | "ns.iflet" | "res.ternary"
( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "res.ternary"
| "res.async" | "res.await" | "res.template" );
},
_ ) ->
Expand Down Expand Up @@ -50204,7 +50204,7 @@ let isPrintableAttribute attr =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "ns.iflet" | "res.braces" | "JSX" | "res.async"
( "bs" | "res.uapp" | "res.iflet" | "res.braces" | "JSX" | "res.async"
| "res.await" | "res.template" | "res.ternary" );
},
_ ) ->
Expand Down
10 changes: 5 additions & 5 deletions lib/4.06.1/unstable/js_playground_compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49873,7 +49873,7 @@ let filterParsingAttrs attrs =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "res.braces" | "ns.iflet" | "ns.namedArgLoc"
( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "ns.namedArgLoc"
| "res.optional" | "res.ternary" | "res.async" | "res.await"
| "res.template" );
},
Expand Down Expand Up @@ -50000,7 +50000,7 @@ let flattenableOperators parentOperator childOperator =
let rec hasIfLetAttribute attrs =
match attrs with
| [] -> false
| ({Location.txt = "ns.iflet"}, _) :: _ -> true
| ({Location.txt = "res.iflet"}, _) :: _ -> true
| _ :: attrs -> hasIfLetAttribute attrs

let isIfLetExpr expr =
Expand All @@ -50022,7 +50022,7 @@ let hasAttributes attrs =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "res.braces" | "ns.iflet" | "res.ternary"
( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "res.ternary"
| "res.async" | "res.await" | "res.template" );
},
_ ) ->
Expand Down Expand Up @@ -50204,7 +50204,7 @@ let isPrintableAttribute attr =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "ns.iflet" | "res.braces" | "JSX" | "res.async"
( "bs" | "res.uapp" | "res.iflet" | "res.braces" | "JSX" | "res.async"
| "res.await" | "res.template" | "res.ternary" );
},
_ ) ->
Expand Down Expand Up @@ -162142,7 +162142,7 @@ end
let jsxAttr = (Location.mknoloc "JSX", Parsetree.PStr [])
let uncurriedAppAttr = (Location.mknoloc "res.uapp", Parsetree.PStr [])
let ternaryAttr = (Location.mknoloc "res.ternary", Parsetree.PStr [])
let ifLetAttr = (Location.mknoloc "ns.iflet", Parsetree.PStr [])
let ifLetAttr = (Location.mknoloc "res.iflet", Parsetree.PStr [])
let optionalAttr = (Location.mknoloc "res.optional", Parsetree.PStr [])
let makeAwaitAttr loc = (Location.mkloc "res.await" loc, Parsetree.PStr [])
let makeAsyncAttr loc = (Location.mkloc "res.async" loc, Parsetree.PStr [])
Expand Down
10 changes: 5 additions & 5 deletions lib/4.06.1/whole_compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -104867,7 +104867,7 @@ let filterParsingAttrs attrs =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "res.braces" | "ns.iflet" | "ns.namedArgLoc"
( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "ns.namedArgLoc"
| "res.optional" | "res.ternary" | "res.async" | "res.await"
| "res.template" );
},
Expand Down Expand Up @@ -104994,7 +104994,7 @@ let flattenableOperators parentOperator childOperator =
let rec hasIfLetAttribute attrs =
match attrs with
| [] -> false
| ({Location.txt = "ns.iflet"}, _) :: _ -> true
| ({Location.txt = "res.iflet"}, _) :: _ -> true
| _ :: attrs -> hasIfLetAttribute attrs

let isIfLetExpr expr =
Expand All @@ -105016,7 +105016,7 @@ let hasAttributes attrs =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "res.braces" | "ns.iflet" | "res.ternary"
( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "res.ternary"
| "res.async" | "res.await" | "res.template" );
},
_ ) ->
Expand Down Expand Up @@ -105198,7 +105198,7 @@ let isPrintableAttribute attr =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "ns.iflet" | "res.braces" | "JSX" | "res.async"
( "bs" | "res.uapp" | "res.iflet" | "res.braces" | "JSX" | "res.async"
| "res.await" | "res.template" | "res.ternary" );
},
_ ) ->
Expand Down Expand Up @@ -175574,7 +175574,7 @@ end
let jsxAttr = (Location.mknoloc "JSX", Parsetree.PStr [])
let uncurriedAppAttr = (Location.mknoloc "res.uapp", Parsetree.PStr [])
let ternaryAttr = (Location.mknoloc "res.ternary", Parsetree.PStr [])
let ifLetAttr = (Location.mknoloc "ns.iflet", Parsetree.PStr [])
let ifLetAttr = (Location.mknoloc "res.iflet", Parsetree.PStr [])
let optionalAttr = (Location.mknoloc "res.optional", Parsetree.PStr [])
let makeAwaitAttr loc = (Location.mkloc "res.await" loc, Parsetree.PStr [])
let makeAsyncAttr loc = (Location.mkloc "res.async" loc, Parsetree.PStr [])
Expand Down
2 changes: 1 addition & 1 deletion res_syntax/src/res_core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ end
let jsxAttr = (Location.mknoloc "JSX", Parsetree.PStr [])
let uncurriedAppAttr = (Location.mknoloc "res.uapp", Parsetree.PStr [])
let ternaryAttr = (Location.mknoloc "res.ternary", Parsetree.PStr [])
let ifLetAttr = (Location.mknoloc "ns.iflet", Parsetree.PStr [])
let ifLetAttr = (Location.mknoloc "res.iflet", Parsetree.PStr [])
let optionalAttr = (Location.mknoloc "res.optional", Parsetree.PStr [])
let makeAwaitAttr loc = (Location.mkloc "res.await" loc, Parsetree.PStr [])
let makeAsyncAttr loc = (Location.mkloc "res.async" loc, Parsetree.PStr [])
Expand Down
8 changes: 4 additions & 4 deletions res_syntax/src/res_parsetree_viewer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ let filterParsingAttrs attrs =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "res.braces" | "ns.iflet" | "ns.namedArgLoc"
( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "ns.namedArgLoc"
| "res.optional" | "res.ternary" | "res.async" | "res.await"
| "res.template" );
},
Expand Down Expand Up @@ -335,7 +335,7 @@ let flattenableOperators parentOperator childOperator =
let rec hasIfLetAttribute attrs =
match attrs with
| [] -> false
| ({Location.txt = "ns.iflet"}, _) :: _ -> true
| ({Location.txt = "res.iflet"}, _) :: _ -> true
| _ :: attrs -> hasIfLetAttribute attrs

let isIfLetExpr expr =
Expand All @@ -357,7 +357,7 @@ let hasAttributes attrs =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "res.braces" | "ns.iflet" | "res.ternary"
( "bs" | "res.uapp" | "res.braces" | "res.iflet" | "res.ternary"
| "res.async" | "res.await" | "res.template" );
},
_ ) ->
Expand Down Expand Up @@ -539,7 +539,7 @@ let isPrintableAttribute attr =
match attr with
| ( {
Location.txt =
( "bs" | "res.uapp" | "ns.iflet" | "res.braces" | "JSX" | "res.async"
( "bs" | "res.uapp" | "res.iflet" | "res.braces" | "JSX" | "res.async"
| "res.await" | "res.template" | "res.ternary" );
},
_ ) ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ switch result {
}

;;((match result with | Some x -> Js.log {js|The sky is blue|js} | _ -> ())
[@ns.iflet ][@warning "-4"])
[@res.iflet ][@warning "-4"])
;;((match result with
| Error x -> Js.log {js|The sky is red|js}
| _ ->
(((match result with
| Ok y -> Js.log {js|The sky is blue|js}
| _ -> ()))
[@ns.iflet ][@warning "-4"]))[@ns.iflet ][@warning "-4"])
[@res.iflet ][@warning "-4"]))[@res.iflet ][@warning "-4"])