Skip to content

Commit

Permalink
case
Browse files Browse the repository at this point in the history
  • Loading branch information
zaoqi committed Aug 18, 2018
1 parent ffe8c62 commit c08ddc5
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 66 deletions.
3 changes: 2 additions & 1 deletion example-case.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "module<"
define_public_lambda_withTypeOfBody(CaSe(var(x, int)) __ int)(
case_const_number(x, int)(
((1,2),3;);
((1,2) __ 3;),
(_ __ 4;)
);
)

Expand Down
3 changes: 2 additions & 1 deletion make.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ LANG_define => 全局定義
DEFINE_FUNCTION(X(LANG_prefix"case_const_number_hELPEr")Nat(i),var_from_to(1,i), \
for_in_from_to(j, 1, i, { \
X(LANG_prefix"case_const_number_hELPEr_each")X(" _")Nat(j)X(" ") \
}))}) \
}) \
X("}"LANG_prefix"case_const_number_tEMp;})"))}) \
DEFINE_FUNCTION(X(LANG_prefix"case_const_number_hELPEr_each0"),X("x"), \
Call1(X(TOOLS_prefix"expand"), X(LANG_prefix"case_const_number_hELPEr_each")X(" x"))) \
DEFINE_FUNCTION(X(LANG_prefix"case_const_number_hELPEr_append"),X("x,y"),X("x y")) \
Expand Down
Loading

0 comments on commit c08ddc5

Please sign in to comment.