Removed braces from the lexer and parser.
This commit is contained in:
parent
ad6cbf32eb
commit
ea4af374f9
@ -459,8 +459,7 @@ let byte_seq = byte | byte (byte | '_')* byte
|
||||
let bytes = "0x" (byte_seq? as seq)
|
||||
let esc = "\\n" | "\\\"" | "\\\\" | "\\b"
|
||||
| "\\r" | "\\t" | "\\x" byte
|
||||
let symbol = ';' | ','
|
||||
| '(' | ')' | '{' | '}' | '[' | ']'
|
||||
let symbol = ';' | ',' | '(' | ')'| '[' | ']'
|
||||
| '#' | '|' | "->" | ":=" | '=' | ':'
|
||||
| '<' | "<=" | '>' | ">=" | "=/="
|
||||
| '+' | '-' | '*' | '.' | '_' | '^'
|
||||
|
@ -17,8 +17,6 @@
|
||||
%token <Region.t> COMMA (* "," *)
|
||||
%token <Region.t> LPAR (* "(" *)
|
||||
%token <Region.t> RPAR (* ")" *)
|
||||
%token <Region.t> LBRACE (* "{" *)
|
||||
%token <Region.t> RBRACE (* "}" *)
|
||||
%token <Region.t> LBRACKET (* "[" *)
|
||||
%token <Region.t> RBRACKET (* "]" *)
|
||||
%token <Region.t> CONS (* "#" *)
|
||||
|
10
Parser.mly
10
Parser.mly
@ -61,16 +61,6 @@ par(X):
|
||||
in {region; value}
|
||||
}
|
||||
|
||||
braces(X):
|
||||
LBRACE X RBRACE {
|
||||
let region = cover $1 $3
|
||||
and value = {
|
||||
lbrace = $1;
|
||||
inside = $2;
|
||||
rbrace = $3}
|
||||
in {region; value}
|
||||
}
|
||||
|
||||
brackets(X):
|
||||
LBRACKET X RBRACKET {
|
||||
let region = cover $1 $3
|
||||
|
@ -13,7 +13,7 @@ entrypoint contribute (storage store : store;
|
||||
var operations : list (operation) := []
|
||||
begin
|
||||
if now > store.deadline then
|
||||
fail "Deadline passed";
|
||||
fail "Deadline passed";
|
||||
else
|
||||
case store.backers[sender] of
|
||||
None -> store.backers[sender] := Some (amount)
|
||||
@ -56,7 +56,7 @@ entrypoint claim (storage store : store; const sender : address)
|
||||
else
|
||||
begin
|
||||
operations := [Transfer (sender, amount)];
|
||||
remove sender from map store.backers;
|
||||
remove sender from map store.backers
|
||||
end
|
||||
end
|
||||
end with (store, operations)
|
||||
|
Loading…
Reference in New Issue
Block a user