Skip to content

Commit 0fe7324

Browse files
committed
updating disabled macros
1 parent 64ddaa9 commit 0fe7324

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/macros-disabled.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ macro base_contract {
3232
rule { $name } => { _c.$name }
3333
}
3434

35+
macroclass named_contract {
36+
rule { $name $[:] $contract:any_contract }
37+
}
38+
3539
macro function_contract {
3640
rule { ($dom:named_contract (,) ...) -> $range:named_contract | { $guard ... } } => {
3741
_c.fun([$dom$contract (,) ...], $range$contract, {
@@ -102,6 +106,7 @@ macro optional_contract {
102106
}
103107
}
104108

109+
105110
macro non_or_contract {
106111
rule { $contract:function_contract } => { $contract }
107112
rule { $contract:object_contract } => { $contract }
@@ -132,13 +137,25 @@ let @ = macro {
132137
}
133138
}
134139

140+
case {_
141+
forall $($varName (,) ...)
142+
$contracts:function_contract
143+
function $name ($params ...) { $body ...}
144+
} => {
145+
return #{
146+
function $name ($params ...) {
147+
$body ...
148+
}
149+
}
150+
}
151+
135152
case {_
136153
$contracts:function_contract
137154
function $name ($params ...) { $body ...}
138155
} => {
139156
return #{
140157
function $name ($params ...) {
141-
return $body ...
158+
$body ...
142159
}
143160
}
144161
}

src/macros.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ macro any_contract {
127127
rule { $contract:non_or_contract } => { $contract }
128128
}
129129

130-
// macro ident_list {
131-
// rule { $p (,) ... }
132-
// }
133130

134131
let @ = macro {
135132
case {_

0 commit comments

Comments
 (0)