-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
279 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
#include "types/gen/gen_input.h" | ||
|
||
namespace shdc::gen::bare { | ||
|
||
ErrMsg generate(const GenInput& gen); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Top-level wrapper for code-generators. | ||
*/ | ||
#include "generate.h" | ||
#include "types/format.h" | ||
#include "bare.h" | ||
#include "sokol.h" | ||
#include "sokolnim.h" | ||
#include "sokolodin.h" | ||
#include "sokolrust.h" | ||
#include "sokolzig.h" | ||
#include "yaml.h" | ||
|
||
namespace shdc::gen { | ||
|
||
ErrMsg generate(Format::Enum format, const GenInput& gen_input) { | ||
switch (format) { | ||
case Format::BARE: | ||
return bare::generate(gen_input); | ||
case Format::BARE_YAML: | ||
return yaml::generate(gen_input); | ||
case Format::SOKOL_ZIG: | ||
return sokolzig::generate(gen_input); | ||
case Format::SOKOL_NIM: | ||
return sokolnim::generate(gen_input); | ||
case Format::SOKOL_ODIN: | ||
return sokolodin::generate(gen_input); | ||
case Format::SOKOL_RUST: | ||
return sokolrust::generate(gen_input); | ||
default: | ||
return sokol::generate(gen_input); | ||
} | ||
} | ||
|
||
} // namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
#include "types/gen/gen_input.h" | ||
#include "types/errmsg.h" | ||
#include "types/format.h" | ||
|
||
namespace shdc::gen { | ||
|
||
ErrMsg generate(Format::Enum format, const GenInput& gen_input); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
#include "types/gen/gen_input.h" | ||
|
||
namespace shdc::gen::sokol { | ||
|
||
ErrMsg generate(const GenInput& gen); | ||
|
||
} |
Oops, something went wrong.