Commit b6c77783 authored by PoroCYon's avatar PoroCYon
Browse files

make it compile with the latest F# and .NET versions

parent bcd03d62
......@@ -42,7 +42,7 @@ let printHeader data asAList =
fprintfn out "#define %c_%s \"%s\"" (System.Char.ToUpper ty.[0]) (name.ToUpper()) newName
fprintfn out ""
for file, code in data do
for (file: string), code in data do
let name = (Path.GetFileName file).Replace(".", "_")
if asAList then
fprintfn out "// %s" file
......@@ -72,7 +72,7 @@ let printJSHeader data =
fprintfn out "var %c_%s = \"%s\"" (System.Char.ToUpper ty.[0]) (name.ToUpper()) newName
fprintfn out ""
for file, code in data do
for (file: string), code in data do
let name = (Path.GetFileName file).Replace(".", "_")
fprintfn out "var %s =\n \"%s\"" name (Printer.print code)
fprintfn out ""
......@@ -90,7 +90,7 @@ let printNasmHeader data =
fprintfn out "_%c_%s: db '%s', 0" (System.Char.ToUpper ty.[0]) (name.ToUpper()) newName
fprintfn out ""
for file, code in data do
for (file: string), code in data do
let name = (Path.GetFileName file).Replace(".", "_")
fprintfn out "_%s:\n\tdb '%s', 0" name (Printer.print code)
fprintfn out ""
......
......@@ -49,7 +49,7 @@ module private ParseImpl =
let number =
let r = @"(\d+\.?\d*|\.\d+)([eE][-+]?[0-9]+)?"
let conv s =
let conv (s: string) =
let ok, res = System.Int32.TryParse(s)
if ok then Ast.Int (res, "")
else Ast.Float (try float s, "" with _ -> failwith ("invalid number: " + s))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment