Skip to content

Commit

Permalink
remove printIntToPrint plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalMarsalek committed Apr 3, 2024
1 parent c57aa1f commit c1668d3
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 17 deletions.
3 changes: 1 addition & 2 deletions src/languages/golfscript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
import {
flipBinaryOps,
removeImplicitConversions,
printIntToPrint,
arraysToLists,
mapBackwardsIndexToForwards,
mapOps,
Expand Down Expand Up @@ -76,7 +75,7 @@ const golfscriptLanguage: Language = {
extension: "gs",
emitter: new GolfscriptEmitter(),
phases: [
required(printIntToPrint, arraysToLists, usePrimaryTextOps("byte")),
required(arraysToLists, usePrimaryTextOps("byte")),
simplegolf(golfLastPrint(false)),
search(
flipBinaryOps,
Expand Down
2 changes: 0 additions & 2 deletions src/languages/javascript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
import { JavascriptEmitter } from "./emit";
import {
removeImplicitConversions,
printIntToPrint,
methodsAsFunctions,
mapOps,
mapOpsTo,
Expand Down Expand Up @@ -73,7 +72,6 @@ const javascriptLanguage: Language = {
extension: "js",
emitter: new JavascriptEmitter(),
phases: [
required(printIntToPrint),
simplegolf(golfLastPrint(), charToIntToDec, ordToDecToInt),
search(
golfStringListLiteral(),
Expand Down
3 changes: 1 addition & 2 deletions src/languages/lua/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { LuaEmitter } from "./emit";
import {
flipBinaryOps,
removeImplicitConversions,
printIntToPrint,
mapOps,
mapOpsTo,
mapBackwardsIndexToForwards,
Expand Down Expand Up @@ -69,7 +68,7 @@ const luaLanguage: Language = {
extension: "lua",
emitter: new LuaEmitter(),
phases: [
required(printIntToPrint, usePrimaryTextOps("byte")),
required(usePrimaryTextOps("byte")),
simplegolf(golfLastPrint(), charToIntToDec, ordToDecToInt),
search(
mergePrint,
Expand Down
3 changes: 1 addition & 2 deletions src/languages/nim/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { NimEmitter } from "./emit";
import {
flipBinaryOps,
removeImplicitConversions,
printIntToPrint,
mapOps,
mapOpsTo,
mapBackwardsIndexToForwards,
Expand Down Expand Up @@ -103,7 +102,7 @@ const nimLanguage: Language = {
extension: "nim",
emitter: new NimEmitter(),
phases: [
required(printIntToPrint, usePrimaryTextOps("byte")),
required(usePrimaryTextOps("byte")),
simplegolf(golfLastPrint(), charToIntToDec),
search(
mergePrint,
Expand Down
3 changes: 1 addition & 2 deletions src/languages/python/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { PythonEmitter, emitPythonText } from "./emit";
import {
removeImplicitConversions,
methodsAsFunctions,
printIntToPrint,
arraysToLists,
mapOps,
mapBackwardsIndexToForwards,
Expand Down Expand Up @@ -93,7 +92,7 @@ const pythonLanguage: Language = {
extension: "py",
emitter: new PythonEmitter(),
phases: [
required(printIntToPrint, arraysToLists, usePrimaryTextOps("codepoint")),
required(arraysToLists, usePrimaryTextOps("codepoint")),
simplegolf(golfLastPrint()),
search(
golfStringListLiteral(),
Expand Down
3 changes: 1 addition & 2 deletions src/languages/swift/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
import {
flipBinaryOps,
removeImplicitConversions,
printIntToPrint,
arraysToLists,
mapOps,
mapOpsTo,
Expand Down Expand Up @@ -78,7 +77,7 @@ const swiftLanguage: Language = {
extension: "swift",
emitter: new SwiftEmitter(),
phases: [
required(printIntToPrint, arraysToLists, usePrimaryTextOps("codepoint")),
required(arraysToLists, usePrimaryTextOps("codepoint")),
simplegolf(
golfLastPrint(),
comparisonToDivision,
Expand Down
5 changes: 0 additions & 5 deletions src/plugins/ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,6 @@ export const methodsAsFunctions: Plugin = {
},
};

export const printIntToPrint: Plugin = mapOps({
"print[Int]": (a) => op["print[Text]"](op.int_to_dec(a)),
"println[Int]": (a) => op["println[Text]"](op.int_to_dec(a)),
});

export const arraysToLists: Plugin = {
name: "arraysToLists",
bakeType: true,
Expand Down

0 comments on commit c1668d3

Please sign in to comment.