Skip to content

Commit

Permalink
remove unused Smithy4sRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
inferrinizzard committed Apr 3, 2024
1 parent 0d974b4 commit 95db943
Showing 1 changed file with 4 additions and 58 deletions.
62 changes: 4 additions & 58 deletions packages/quicktype-core/src/language/Scala3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ export class Scala3Renderer extends ConvenienceRenderer {
delimiter === "curly"
? ["{", "}"]
: delimiter === "paren"
? ["(", ")"]
: delimiter === "none"
? ["", ""]
: ["{", "})"];
? ["(", ")"]
: delimiter === "none"
? ["", ""]
: ["{", "})"];
this.emitLine(line, " ", open);
this.indent(f);
this.emitLine(close);
Expand Down Expand Up @@ -485,60 +485,6 @@ export class UpickleRenderer extends Scala3Renderer {
}
}

export class Smithy4sRenderer extends Scala3Renderer {
protected emitHeader(): void {
if (this.leadingComments !== undefined) {
this.emitComments(this.leadingComments);
} else {
this.emitUsageHeader();
}

this.ensureBlankLine();
this.emitLine("namespace ", this._scalaOptions.packageName);
this.ensureBlankLine();
}

protected emitTopLevelArray(t: ArrayType, name: Name): void {
const elementType = this.scalaType(t.items);
this.emitLine(["list ", name, " { member : ", elementType, "}"]);
}

protected emitTopLevelMap(t: MapType, name: Name): void {
const elementType = this.scalaType(t.values);
this.emitLine(["map ", name, " { map[ key : String , value : ", elementType, "}"]);
}

protected emitEmptyClassDefinition(c: ClassType, className: Name): void {
this.emitDescription(this.descriptionForType(c));
this.emitLine("structure ", className, "{}");
}

protected emitEnumDefinition(e: EnumType, enumName: Name): void {
this.emitDescription(this.descriptionForType(e));

this.ensureBlankLine();
this.emitItem(["enum ", enumName, " { "]);
let count = e.cases.size;
this.forEachEnumCase(e, "none", (name, jsonName) => {
// if (!(jsonName == "")) {
/* const backticks =
shouldAddBacktick(jsonName) ||
jsonName.includes(" ") ||
!isNaN(parseInt(jsonName.charAt(0)))
if (backticks) {this.emitItem("`")} else */
this.emitLine();
this.emitItem([name, ' = "', jsonName, '"']);
// if (backticks) {this.emitItem("`")}
if (--count > 0) this.emitItem([","]);
//} else {
//--count
//}
});
this.ensureBlankLine();
this.emitItem(["}"]);
}
}

export class CirceRenderer extends Scala3Renderer {
seenUnionTypes: Array<string> = [];

Expand Down

0 comments on commit 95db943

Please sign in to comment.