Skip to content

Commit

Permalink
Begin preparing for source syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoc committed Jul 7, 2022
1 parent b90ac95 commit 6101661
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions jscomp/frontend/ast_attributes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ let is_inline : attr -> bool =
let has_inline_payload (attrs : t) = Ext_list.find_first attrs is_inline

let is_await : attr -> bool =
fun ({ txt }, _) -> txt = "await"
fun ({ txt }, _) -> txt = "await" || txt = "res.await"

let is_async : attr -> bool =
fun ({ txt }, _) -> txt = "async"
fun ({ txt }, _) -> txt = "async" || txt = "res.async"

let has_await_payload (attrs : t) = Ext_list.find_first attrs is_await
let has_async_payload (attrs : t) = Ext_list.find_first attrs is_async
Expand Down
2 changes: 1 addition & 1 deletion jscomp/ml/translcore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ and transl_exp0 (e : Typedtree.expression) : Lambda.lambda =
| Texp_let (rec_flag, pat_expr_list, body) ->
transl_let rec_flag pat_expr_list (transl_exp body)
| Texp_function { arg_label = _; param; cases; partial } ->
let async = e.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "async") in
let async = e.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "async" || txt = "res.async") in
let params, body, return_unit =
let pl = push_defaults e.exp_loc [] cases partial in
transl_function e.exp_loc partial param pl
Expand Down
6 changes: 3 additions & 3 deletions lib/4.06.1/unstable/js_compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -254564,10 +254564,10 @@ let is_inline : attr -> bool =
let has_inline_payload (attrs : t) = Ext_list.find_first attrs is_inline

let is_await : attr -> bool =
fun ({ txt }, _) -> txt = "await"
fun ({ txt }, _) -> txt = "await" || txt = "res.await"

let is_async : attr -> bool =
fun ({ txt }, _) -> txt = "async"
fun ({ txt }, _) -> txt = "async" || txt = "res.async"

let has_await_payload (attrs : t) = Ext_list.find_first attrs is_await
let has_async_payload (attrs : t) = Ext_list.find_first attrs is_async
Expand Down Expand Up @@ -270226,7 +270226,7 @@ and transl_exp0 (e : Typedtree.expression) : Lambda.lambda =
| Texp_let (rec_flag, pat_expr_list, body) ->
transl_let rec_flag pat_expr_list (transl_exp body)
| Texp_function { arg_label = _; param; cases; partial } ->
let async = e.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "async") in
let async = e.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "async" || txt = "res.async") in
let params, body, return_unit =
let pl = push_defaults e.exp_loc [] cases partial in
transl_function e.exp_loc partial param pl
Expand Down
6 changes: 3 additions & 3 deletions lib/4.06.1/unstable/js_playground_compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -256027,10 +256027,10 @@ let is_inline : attr -> bool =
let has_inline_payload (attrs : t) = Ext_list.find_first attrs is_inline

let is_await : attr -> bool =
fun ({ txt }, _) -> txt = "await"
fun ({ txt }, _) -> txt = "await" || txt = "res.await"

let is_async : attr -> bool =
fun ({ txt }, _) -> txt = "async"
fun ({ txt }, _) -> txt = "async" || txt = "res.async"

let has_await_payload (attrs : t) = Ext_list.find_first attrs is_await
let has_async_payload (attrs : t) = Ext_list.find_first attrs is_async
Expand Down Expand Up @@ -290837,7 +290837,7 @@ and transl_exp0 (e : Typedtree.expression) : Lambda.lambda =
| Texp_let (rec_flag, pat_expr_list, body) ->
transl_let rec_flag pat_expr_list (transl_exp body)
| Texp_function { arg_label = _; param; cases; partial } ->
let async = e.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "async") in
let async = e.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "async" || txt = "res.async") in
let params, body, return_unit =
let pl = push_defaults e.exp_loc [] cases partial in
transl_function e.exp_loc partial param pl
Expand Down
6 changes: 3 additions & 3 deletions lib/4.06.1/whole_compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -258615,10 +258615,10 @@ let is_inline : attr -> bool =
let has_inline_payload (attrs : t) = Ext_list.find_first attrs is_inline

let is_await : attr -> bool =
fun ({ txt }, _) -> txt = "await"
fun ({ txt }, _) -> txt = "await" || txt = "res.await"

let is_async : attr -> bool =
fun ({ txt }, _) -> txt = "async"
fun ({ txt }, _) -> txt = "async" || txt = "res.async"

let has_await_payload (attrs : t) = Ext_list.find_first attrs is_await
let has_async_payload (attrs : t) = Ext_list.find_first attrs is_async
Expand Down Expand Up @@ -273355,7 +273355,7 @@ and transl_exp0 (e : Typedtree.expression) : Lambda.lambda =
| Texp_let (rec_flag, pat_expr_list, body) ->
transl_let rec_flag pat_expr_list (transl_exp body)
| Texp_function { arg_label = _; param; cases; partial } ->
let async = e.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "async") in
let async = e.exp_attributes |> List.exists (fun ({txt}, _payload) -> txt = "async" || txt = "res.async") in
let params, body, return_unit =
let pl = push_defaults e.exp_loc [] cases partial in
transl_function e.exp_loc partial param pl
Expand Down

0 comments on commit 6101661

Please sign in to comment.