Skip to content

Commit

Permalink
Remove type_extra_tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
daxida committed Jun 27, 2024
1 parent 563edd8 commit 89f9c19
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions config/stub_templates/pascal/stub_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ Long = "StrToInt64"
Float = "StrToFloat"
Bool = "StrToInt"

[type_extra_tokens]
Int = "%d"
Long = "%ld"
Float = "%f"
Bool = "UNSUPPORTED_IN_CODINGAME"
String = "%s"
Word = "UNSUPPORTED_IN_CODINGAME"

[variable_name_options]
casing = "pascal_case"
allow_uppercase_vars = false
Expand Down
4 changes: 0 additions & 4 deletions src/stub/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ pub(super) struct Language {
// But sometimes you need two tokens per type for a language.
// - Int32 and StrToInt for Pascal.
pub type_parsers: Option<TypeTokens>,
// And parsing symbols %d %f %ld/%lld.
// Some languages share them for reading/writing while others
// like Pascal / OCaml / F# use them only for printing (in CG)
pub type_extra_tokens: Option<TypeTokens>,
#[serde(deserialize_with = "deser_preprocessor", default)]
pub preprocessor: Option<Preprocessor>,
}
Expand Down
1 change: 0 additions & 1 deletion src/stub/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ impl Renderer {

context.insert("type_tokens", &self.lang.type_tokens);
context.insert("type_parsers", &self.lang.type_parsers);
context.insert("type_extra_tokens", &self.lang.type_extra_tokens);

self.tera
.render(&format!("{template_name}.{}.jinja", self.lang.source_file_ext), context)
Expand Down

0 comments on commit 89f9c19

Please sign in to comment.