Skip to content

Commit

Permalink
Merge pull request symmetryinvestments#265 from symmetryinvestments/f…
Browse files Browse the repository at this point in the history
…ix_excel

fix autowrap excel and update to recent excel-d
  • Loading branch information
atilaneves committed Sep 15, 2020
2 parents 8e069d9 + 49ad87e commit 1ef8a37
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
3 changes: 2 additions & 1 deletion excel/dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ authors "Atila Neves"
license "BSD"
targetType "sourceLibrary"

dependency "excel-d" version=">=0.5.5"
dependency "excel-d" version=">=0.5.8"
dependency "autowrap:common" path="../common"
66 changes: 33 additions & 33 deletions excel/source/autowrap/excel/package.d
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
module autowrap.excel;


public import autowrap.types: Modules, Module, isModule,
LibraryName, PreModuleInitCode, PostModuleInitCode, RootNamespace;


string wrapDlang(
autowrap.types.LibraryName libraryName,
Modules modules,
RootNamespace _ = RootNamespace(), // ignored in this backend
PreModuleInitCode preModuleInitCode = PreModuleInitCode(), // ignored in this backend
PostModuleInitCode postModuleInitCode = PostModuleInitCode(), // ignored in this backend
)()
@safe pure
{
import std.algorithm: map;
import std.array: join;

mixin(`return wrapAll!(`, modules.value.map!(a => `"` ~ a.name ~ `"`).join(`, `), `;`);
}


string wrapAll(Modules...)(in string mainModule = __MODULE__) {
if(!__ctfe) return "";

import xlld: wrapAll_ = wrapAll;
import std.typecons: Yes;

return
"import xlld;\n" ~
wrapAll_!Modules(Yes.onlyExports, mainModule);
}
module autowrap.excel;


public import autowrap.types: Modules, Module, isModule,
LibraryName, PreModuleInitCode, PostModuleInitCode, RootNamespace;


string wrapDlang(
autowrap.types.LibraryName libraryName,
Modules modules,
RootNamespace _ = RootNamespace(), // ignored in this backend
PreModuleInitCode preModuleInitCode = PreModuleInitCode(), // ignored in this backend
PostModuleInitCode postModuleInitCode = PostModuleInitCode(), // ignored in this backend
)()
@safe pure
{
import std.algorithm: map;
import std.array: join;

mixin(`return wrapAll!(`, modules.value.map!(a => `"` ~ a.name ~ `"`).join(`, `), `;`);
}


string wrapAll(Modules...)(in string mainModule = __MODULE__) {
if(!__ctfe) return "";

import xlld: wrapAll_ = wrapAll;
import std.typecons: Yes;

return
"import xlld;\n" ~
wrapAll_!Modules(Yes.onlyExports, Yes.pascalCase, mainModule);
}

0 comments on commit 1ef8a37

Please sign in to comment.