Skip to content

Commit 675b161

Browse files
committed
adopt to iexpr.core 0.5.3
1 parent 1c04e6d commit 675b161

3 files changed

Lines changed: 16 additions & 11 deletions

File tree

ExprSharp.Repl/Program.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using CommandLine;
22
using ExprSharp.Runtime;
3+
using iExpr;
34
using System;
45
using System.IO;
56

@@ -135,7 +136,8 @@ static object run(string code)
135136
{
136137
try
137138
{
138-
return runtime.Execute(code);
139+
var x = runtime.Execute(code);
140+
return x;
139141
}
140142
catch (Exception ex)
141143
{
@@ -154,7 +156,8 @@ static void Work_Loaded(string cmd)
154156
if (File.Exists(path))
155157
{
156158
var v = run(File.ReadAllText(path));
157-
if (v != null) Console.WriteLine(v.ToString());
159+
var ou = v?.ToString();
160+
if (!String.IsNullOrEmpty(ou)) Console.WriteLine(ou);
158161
}
159162
else
160163
{
@@ -188,7 +191,8 @@ static void Work_Loaded(string cmd)
188191
WithNotParsed(errs =>
189192
{
190193
var v = run(cmd);
191-
if (v != null) Console.WriteLine(v.ToString());
194+
var ou = v?.ToString();
195+
if (!String.IsNullOrEmpty(ou)) Console.WriteLine(ou);
192196
});
193197
}
194198
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"profiles": {
33
"ExprSharp.Repl": {
4-
"commandName": "Project"
4+
"commandName": "Project",
5+
"workingDirectory": "G:\\设计\\design\\ExprSharp\\test"
56
}
67
}
78
}

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
</div>
44

55
![](https://img.shields.io/badge/framework-.netcore2.0-blue.svg)
6-
![](https://img.shields.io/badge/iexpr.core-v0.5.2-brightgreen.svg)
7-
![](http://progressed.io/bar/40?title=done)
8-
9-
[x]: ![](https://img.shields.io/badge/build-passing-brightgreen.svg)
10-
[x]: ![](https://img.shields.io/badge/release-v0.5.2-blue.svg)
11-
[x]: [![](https://img.shields.io/badge/nuget-v0.5.2.2-brightgreen.svg)](https://www.nuget.org/packages/iExpr.Core/0.5.2.2)
6+
![](https://img.shields.io/badge/iexpr.core-v0.5.6-brightgreen.svg)
7+
![](http://progressed.io/bar/50?title=done)
128

139
+ Author: Stardust D.L.
1410
+ Version: 0.1
1511

16-
The REPL environment for ExprSharp.
12+
The REPL environment for ExprSharp *(need ExprSharp.Core)*.
13+
14+
> ExprSharp: A tiny code language based on [iExpr.Core](https://github.com/iExpr/iExpr.Core).
15+
16+
> For more information about ExprSharp, please see [**Wiki**](https://github.com/ExprSharp/ExprSharp.Core/wiki)
1717
1818
# Commands
1919
|Items|Description|

0 commit comments

Comments
 (0)