Skip to content

Commit 6aedf25

Browse files
committed
fix Warning 3 errors in parser by not opening Core
1 parent 3773b51 commit 6aedf25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/parser.mly

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@
1919
%token EOF
2020

2121
%{
22-
open Core
2322
open Ast
2423
(* get the precedence of the binary operator token. *)
2524
let precedence c =
26-
match Hashtbl.find binop_precedence c with
25+
match Base.Hashtbl.find binop_precedence c with
2726
| None -> -1
2827
| Some p -> p
2928
%}
@@ -116,7 +115,8 @@ prototype:
116115
{ Prototype (name, args) }
117116
| kind = operator_kind; op = operator; prec = precedence;
118117
args = delimited(LEFT_PAREN, list(IDENT), RIGHT_PAREN)
119-
{ match kind with
118+
{ let open Base in
119+
match kind with
120120
| `Binary ->
121121
if Int.(<>) (List.length args) 2
122122
then raise_s
@@ -143,7 +143,7 @@ operator_kind:
143143
;
144144

145145
precedence:
146-
| n = option(NUMBER) { Int.of_float (Option.value n ~default:30.0) }
146+
| n = option(NUMBER) { Base.Int.of_float (Base.Option.value n ~default:30.0) }
147147
;
148148

149149
(* definition

0 commit comments

Comments
 (0)