Skip to content

Commit

Permalink
Enable client/server annotations anywhere (links-lang#1133)
Browse files Browse the repository at this point in the history
This patch enables client/server annotations on local and anonymous functions.
  • Loading branch information
jamescheney authored Apr 27, 2022
1 parent 0605152 commit 474137f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/parser.mly
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,8 @@ primary_expression:
| LBRACKET perhaps_exps RBRACKET { list ~ppos:$loc $2 }
| LBRACKET exp DOTDOT exp RBRACKET { with_pos $loc (RangeLit($2, $4)) }
| xml { $1 }
| linearity arg_lists block { fun_lit ~ppos:$loc $1 $2 $3 }
| linearity arg_lists switch_funlit_body { switch_fun_lit ~ppos:$loc $1 $2 $3 }
| linearity arg_lists perhaps_location block { fun_lit ~ppos:$loc ~location:$3 $1 $2 $4 }
| linearity arg_lists perhaps_location switch_funlit_body { switch_fun_lit ~ppos:$loc ~location:$3 $1 $2 $4 }
| LEFTTRIANGLE cp_expression RIGHTTRIANGLE { with_pos $loc (CP $2) }
| DOLLAR primary_expression { with_pos $loc (Generalise $2) }

Expand Down Expand Up @@ -957,10 +957,10 @@ links_open:
binding:
| VAR pattern EQ exp SEMICOLON { val_binding ~ppos:$loc $2 $4 }
| exp SEMICOLON { with_pos $loc (Exp $1) }
| signatures fun_kind VARIABLE arg_lists block { fun_binding ~ppos:$loc (fst $1) ~unsafe_sig:(snd $1) ($2, $3, $4, loc_unknown, $5) }
| fun_kind VARIABLE arg_lists block { fun_binding ~ppos:$loc None ($1, $2, $3, loc_unknown, $4) }
| signatures fun_kind VARIABLE arg_lists switch_funlit_body { switch_fun_binding ~ppos:$loc (fst $1) ~unsafe_sig:(snd $1) ($2, $3, $4, loc_unknown, $5) }
| fun_kind VARIABLE arg_lists switch_funlit_body { switch_fun_binding ~ppos:$loc None ($1, $2, $3, loc_unknown, $4) }
| signatures fun_kind VARIABLE arg_lists perhaps_location block { fun_binding ~ppos:$loc (fst $1) ~unsafe_sig:(snd $1) ($2, $3, $4, $5, $6) }
| fun_kind VARIABLE arg_lists perhaps_location block { fun_binding ~ppos:$loc None ($1, $2, $3, $4, $5) }
| signatures fun_kind VARIABLE arg_lists perhaps_location switch_funlit_body { switch_fun_binding ~ppos:$loc (fst $1) ~unsafe_sig:(snd $1) ($2, $3, $4, $5, $6) }
| fun_kind VARIABLE arg_lists perhaps_location switch_funlit_body { switch_fun_binding ~ppos:$loc None ($1, $2, $3, $4, $5) }
| typedecl SEMICOLON | links_module
| links_open SEMICOLON { $1 }

Expand Down

0 comments on commit 474137f

Please sign in to comment.