Skip to content

Commit

Permalink
Merge pull request #63 from wilzbach/auto-compile3
Browse files Browse the repository at this point in the history
Auto-compile linenoise on build
  • Loading branch information
MartinNowak authored Feb 28, 2018
2 parents 53c9007 + fefaaf1 commit 514436a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 31 deletions.
27 changes: 0 additions & 27 deletions dub.json

This file was deleted.

18 changes: 18 additions & 0 deletions dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name "drepl"
description "A D interpreter."
authors "Martin Nowak"
copyright "Copyright © 2014-2016, DREPL team"
license "BSL-1.0"
dependency "libdparse" version=">=0.7.1-beta.6 <0.8.0-0"
dependency "colorize" version="~>1.0.5"
lflags "-l:libphobos2.so" "-ldl" platform="linux-dmd"
configuration "console" {
dependency "linenoise" version="~>1.1.0"
subConfiguration "linenoise" "vendored"
targetType "executable"
mainSourceFile "src/console.d"
}
configuration "library" {
targetType "library"
excludedSourceFiles "src/console.d"
}
2 changes: 1 addition & 1 deletion dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"versions": {
"colorize": "1.0.5",
"libdparse": "0.7.1-beta.6",
"linenoise": "1.0.0"
"linenoise": "1.1.0+1.0.0"
}
}
1 change: 0 additions & 1 deletion src/drepl/engines/dmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ unittest
dmd = dmdEngine();
assert(dmd.evalDecl("void foo() {}") == ER(true, "foo"));
assert(dmd.evalExpr("foo()") == ER(true, "void"));
assert(dmd.evalExpr("foo(), 3") == ER(true, "3"));

dmd = dmdEngine();
assert(dmd.evalDecl("import std.stdio;").success);
Expand Down
5 changes: 3 additions & 2 deletions src/drepl/interpreter.d
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ private:
Appender!(char[]) _incomplete;
}

Interpreter!Engine interpreter(Engine)(auto ref Engine e) if (isEngine!Engine)
Interpreter!Engine interpreter(Engine)(return scope Engine e) if (isEngine!Engine)
{
return Interpreter!Engine(move(e));
// workaround Issue with return scope detection
return Interpreter!Engine(() @trusted { return move(e); }());
}

unittest
Expand Down

0 comments on commit 514436a

Please sign in to comment.