home
/
code
/
tiger.ml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ef79993
)
Remove label from error raising helper
author
Siraaj Khandkar
<siraaj@khandkar.net>
Tue, 11 Sep 2018 16:32:26 +0000
(12:32 -0400)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Tue, 11 Sep 2018 16:32:26 +0000
(12:32 -0400)
compiler/src/lib/tiger/tiger_error.ml
patch
|
blob
|
blame
|
history
compiler/src/lib/tiger/tiger_error.mli
patch
|
blob
|
blame
|
history
compiler/src/lib/tiger/tiger_parser.mly
patch
|
blob
|
blame
|
history
diff --git
a/compiler/src/lib/tiger/tiger_error.ml
b/compiler/src/lib/tiger/tiger_error.ml
index
eb2c177
..
9e0d16a
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_error.ml
+++ b/
compiler/src/lib/tiger/tiger_error.ml
@@
-2,6
+2,6
@@
module Pos = Tiger_position
exception T of string
exception T of string
-let exn ~pos
~
msg =
+let exn ~pos msg =
let msg = Printf.sprintf "Error: %s. In %s." msg (Pos.to_string pos) in
raise (T msg)
let msg = Printf.sprintf "Error: %s. In %s." msg (Pos.to_string pos) in
raise (T msg)
diff --git
a/compiler/src/lib/tiger/tiger_error.mli
b/compiler/src/lib/tiger/tiger_error.mli
index
25072b4
..
1f0d0ce
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_error.mli
+++ b/
compiler/src/lib/tiger/tiger_error.mli
@@
-1,3
+1,3
@@
exception T of string
exception T of string
-val exn : pos:Tiger_position.t ->
msg:
string -> 'a
+val exn : pos:Tiger_position.t -> string -> 'a
diff --git
a/compiler/src/lib/tiger/tiger_parser.mly
b/compiler/src/lib/tiger/tiger_parser.mly
index
78d56a0
..
f4fbff9
100644
(file)
--- a/
compiler/src/lib/tiger/tiger_parser.mly
+++ b/
compiler/src/lib/tiger/tiger_parser.mly
@@
-75,7
+75,7
@@
program:
| exp EOF { $1 }
program:
| exp EOF { $1 }
- | error {Tiger_error.exn
~pos:(pos ()) ~msg:"invalid syntax"
}
+ | error {Tiger_error.exn
"invalid syntax" ~pos:(pos ())
}
;
exp:
;
exp:
This page took
0.029659 seconds
and
4
git commands to generate.