Skip to content

Commit cbf4ca1

Browse files
committed
fix sprintf WIP
1 parent b3d8ee8 commit cbf4ca1

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/main/java/org/perlonjava/operators/SprintfOperator.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ private static String processFormatSpecifier(
122122
int argIndex,
123123
SprintfValueFormatter formatter) {
124124

125-
System.err.println("DEBUG processFormatSpecifier: raw='" + spec.raw +
126-
"', isValid=" + spec.isValid + ", errorMessage=" + spec.errorMessage);
125+
// System.err.println("DEBUG processFormatSpecifier: raw='" + spec.raw + "', isValid=" + spec.isValid + ", errorMessage=" + spec.errorMessage);
127126

128127
// Handle invalid specifiers FIRST (before %% check)
129128
if (!spec.isValid) {
@@ -336,8 +335,7 @@ private static int updateArgIndex(SprintfFormatParser.FormatSpecifier spec,
336335
* Handle invalid format specifiers.
337336
*/
338337
private static String handleInvalidSpecifier(SprintfFormatParser.FormatSpecifier spec) {
339-
System.err.println("DEBUG handleInvalidSpecifier: raw='" + spec.raw +
340-
"', errorMessage='" + spec.errorMessage + "'");
338+
// System.err.println("DEBUG handleInvalidSpecifier: raw='" + spec.raw + "', errorMessage='" + spec.errorMessage + "'");
341339

342340
String formatOnly = spec.raw;
343341
String trailing = "";
@@ -366,12 +364,12 @@ private static String handleInvalidSpecifier(SprintfFormatParser.FormatSpecifier
366364
}
367365

368366
String warningMessage = "Invalid conversion in sprintf: \"" + formatForWarning + "\"";
369-
System.err.println("DEBUG: About to warn: " + warningMessage);
367+
// System.err.println("DEBUG: About to warn: " + warningMessage);
370368
WarnDie.warn(new RuntimeScalar(warningMessage), new RuntimeScalar(""));
371369
}
372370

373371
// Don't consume any arguments for invalid specifiers
374-
System.err.println("DEBUG: Returning from handleInvalidSpecifier: '" + formatOnly + trailing + "'");
372+
// System.err.println("DEBUG: Returning from handleInvalidSpecifier: '" + formatOnly + trailing + "'");
375373
return formatOnly + trailing;
376374
}
377375

0 commit comments

Comments
 (0)