Add D
authorSergiu <srg.pscs@gmail.com>
Fri, 22 Jan 2016 21:01:44 +0000 (23:01 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 23 Jan 2016 16:12:33 +0000 (16:12 +0000)
gruntmaster-compile
lib/Gruntmaster/Daemon.pm
t/01-jobs.t
t/problems/hello/tests/d/meta.yml [new file with mode: 0644]
t/problems/hello/tests/d/prog.d [new file with mode: 0644]

index 3a0dac8..be5dab5 100755 (executable)
@@ -31,6 +31,7 @@ given ($format){
        exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL';
        exec 'rustc', qw/-O -o/, $basename, $name when 'RUST';
        exec 'ocamlc', qw/-o/, $basename, $name when 'OCAML';
+       exec 'dmd', qw/-version=ONLINE_JUDGE -O -release -inline -noboundscheck/, $name when 'D';
 
        when ('BRAINFUCK') {
                system 'bfc', $name and die "bfc failed: errno=$! return=$?";
index f37eaf6..7189c84 100644 (file)
@@ -21,6 +21,7 @@ use constant FORMAT_EXTENSION => {
        BRAINFUCK => 'bf',
        C => 'c',
        CPP => 'cpp',
+       D => 'd',
        GCCGO => 'go',
        GOLANG => 'go',
        GOLFSCRIPT => 'gs',
index 6fb5a16..2cb1eb1 100644 (file)
@@ -22,6 +22,7 @@ use constant COMPILER => {
        qw/BRAINFUCK bfc
           C gcc
           CPP g++
+          D dmd
           GOLFSCRIPT golfscript
           MONO gmcs
           JAVA javac
diff --git a/t/problems/hello/tests/d/meta.yml b/t/problems/hello/tests/d/meta.yml
new file mode 100644 (file)
index 0000000..806a1fd
--- /dev/null
@@ -0,0 +1,7 @@
+test_name: D
+test_description: Hello world in D
+problem: hello
+files:
+  prog:
+    format: D
+    name: prog.d
diff --git a/t/problems/hello/tests/d/prog.d b/t/problems/hello/tests/d/prog.d
new file mode 100644 (file)
index 0000000..4d988a9
--- /dev/null
@@ -0,0 +1,4 @@
+import std.stdio : writeln;
+void main() {
+    writeln("Hello World!");
+}
This page took 0.027467 seconds and 4 git commands to generate.