Skip to content

Commit

Permalink
Base class name moved to a configurable constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Ernesto Castellotti authored Jun 3, 2019
1 parent 192f909 commit 7499a41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/tlscheme2json.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
module tlscheme2json;

enum DEFAULT_TL_URL = "https://raw.githubusercontent.com/tdlib/td/master/td/generate/scheme/td_api.tl";
enum BASECLASS_NAME = "TLBaseClass";

class TLMethod {
string name = "";
Expand Down Expand Up @@ -110,7 +111,7 @@ class TLScheme2Json {
auto tlClass = new TLClass();
tlClass.name = lineSplit[1].replace("class", "").strip();
tlClass.description = lineSplit[2].replace("description", "").strip();
tlClass.inheritance = "TLBaseClass";
tlClass.inheritance = BASECLASS_NAME;
tlClass.isFunction = isFunction;
this.classList ~= tlClass;
}
Expand Down Expand Up @@ -177,7 +178,7 @@ class TLScheme2Json {
}

if(inheritance == null) {
inheritance = "BaseTLClass";
inheritance = BASECLASS_NAME;
}

if(isFunction && return_type.empty) {
Expand Down

0 comments on commit 7499a41

Please sign in to comment.