Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Dec 26, 2020
1 parent bf23e78 commit 9acbbf7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Jint.Repl/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ private static void Main(string[] args)
engine
.SetValue("print", new Action<object>(Console.WriteLine))
.SetValue("load", new Func<string, object>(
path => engine.Execute(File.ReadAllText(path))
.GetCompletionValue()));
path => engine.Execute(File.ReadAllText(path)).GetCompletionValue())
);

var filename = args.Length > 0 ? args[0] : "";
if (!string.IsNullOrEmpty(filename))
Expand Down Expand Up @@ -63,8 +63,7 @@ private static void Main(string[] args)
var result = engine.GetValue(engine.Execute(input, parserOptions).GetCompletionValue());
if (result.Type != Types.None && result.Type != Types.Null && result.Type != Types.Undefined)
{
var str = TypeConverter.ToString(engine.Json.Stringify(engine.Json,
Arguments.From(result, Undefined.Instance, " ")));
var str = TypeConverter.ToString(engine.Json.Stringify(engine.Json, Arguments.From(result, Undefined.Instance, " ")));
Console.WriteLine("=> {0}", str);
}
}
Expand Down

0 comments on commit 9acbbf7

Please sign in to comment.