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 18, 2022
1 parent 1aedc89 commit 412e390
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 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 @@ -254556,10 +254556,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 @@ -270218,7 +270218,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 @@ -256019,10 +256019,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 @@ -290827,7 +290827,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 412e390

Please sign in to comment.