Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
0c1cf7af
Commit
0c1cf7af
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2002-10-20 20:52:38 by cvscast] Empty log message
Original author: cvscast Date: 2002-10-20 20:52:38+00:00
parent
f8f01058
Changes
1
Hide whitespace changes
Inline
Side-by-side
parser/parser.ml
View file @
0c1cf7af
...
@@ -49,6 +49,12 @@ open Ast
...
@@ -49,6 +49,12 @@ open Ast
|
"fun"
;
f
=
OPT
LIDENT
;
"("
;
a
=
LIST1
arrow
SEP
";"
;
")"
;
|
"fun"
;
f
=
OPT
LIDENT
;
"("
;
a
=
LIST1
arrow
SEP
";"
;
")"
;
b
=
branches
->
b
=
branches
->
mk
loc
(
Abstraction
{
fun_name
=
f
;
fun_iface
=
a
;
fun_body
=
b
})
mk
loc
(
Abstraction
{
fun_name
=
f
;
fun_iface
=
a
;
fun_body
=
b
})
|
"fun"
;
f
=
OPT
LIDENT
;
"("
;
arg
=
LIDENT
;
":"
;
targ
=
pat
;
")"
;
":"
;
tres
=
pat
;
"="
;
body
=
expr
->
let
fun_body
=
(
mk
noloc
(
Capture
arg
)
,
body
)
in
mk
loc
(
Abstraction
{
fun_name
=
f
;
fun_iface
=
[(
targ
,
tres
)];
fun_body
=
[
fun_body
]
})
|
(
p
,
e1
)
=
let_binding
;
"in"
;
e2
=
expr
LEVEL
"top"
->
|
(
p
,
e1
)
=
let_binding
;
"in"
;
e2
=
expr
LEVEL
"top"
->
mk
loc
(
Match
(
e1
,
[
p
,
e2
]))
mk
loc
(
Match
(
e1
,
[
p
,
e2
]))
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment