Skip to content

Commit

Permalink
changed file parse for compat
Browse files Browse the repository at this point in the history
  • Loading branch information
osimon8 committed Mar 30, 2022
1 parent 596f57e commit 20b5a2d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion combc.opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.2.7"
version: "0.2.8"
synopsis: "C-style language that compiles to Factorio combinators"
maintainer: ["Owen Simon <osimon922@gmail.com>"]
authors: ["Owen Simon <osimon922@gmail.com>"]
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(lang dune 3.0)
(using menhir 2.1)
(name combc)
(version 0.2.7)
(version 0.2.8)
(license "GPL-3.0")
(authors "Owen Simon <osimon922@gmail.com>")
(maintainers "Owen Simon <osimon922@gmail.com>")
Expand Down
2 changes: 1 addition & 1 deletion src/parser/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(library
(name parse)
(libraries ast compiler menhirLib))
(libraries core_kernel ast compiler menhirLib))

(ocamllex lexer)

Expand Down
4 changes: 3 additions & 1 deletion src/parser/parse.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ type parse_result =
let fast filename : parse_result =
let text, lexbuf =
try
L.read filename
let text = Core_kernel.In_channel.read_all filename in
let lexbuf = L.init filename (Lexing.from_string text) in
text, lexbuf
with Sys_error s -> prerr_endline ("File error\n" ^ s); exit 1;
in
match P.toplevel Lexer.token lexbuf with
Expand Down

0 comments on commit 20b5a2d

Please sign in to comment.