Skip to content

Commit c828f83

Browse files
committed
fix sprintf WIP
1 parent 74c7def commit c828f83

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ FormatSpecifier parseSpecifier() {
272272
spec.raw = input.substring(spec.startPos, spec.endPos);
273273

274274
// Add debug here to check the state before returning
275-
System.err.println("DEBUG: Before return - isValid=" + spec.isValid +
276-
", errorMessage='" + spec.errorMessage + "'");
275+
// System.err.println("DEBUG: Before return - isValid=" + spec.isValid +
276+
// ", errorMessage='" + spec.errorMessage + "'");
277277

278278
// Mark as invalid if we found spaces in the format
279279
if (hasInvalidSpace) {
@@ -285,8 +285,8 @@ FormatSpecifier parseSpecifier() {
285285
}
286286

287287
// Add debug after validation
288-
System.err.println("DEBUG: After validation - isValid=" + spec.isValid +
289-
", errorMessage='" + spec.errorMessage + "'");
288+
// System.err.println("DEBUG handleInvalidSpecifier: raw='" + spec.raw +
289+
// "', errorMessage='" + spec.errorMessage + "'");
290290

291291
return spec;
292292
}
@@ -303,9 +303,9 @@ Integer parseNumber() {
303303
}
304304

305305
void validateSpecifier(FormatSpecifier spec) {
306-
System.err.println("DEBUG validateSpecifier: raw='" + spec.raw +
307-
"', vectorFlag=" + spec.vectorFlag +
308-
", conversionChar='" + spec.conversionChar + "'");
306+
// System.err.println("DEBUG validateSpecifier: raw='" + spec.raw +
307+
// "', vectorFlag=" + spec.vectorFlag +
308+
// ", conversionChar='" + spec.conversionChar + "'");
309309
// Special case: %*v formats are valid
310310
if (spec.vectorFlag && spec.widthFromArg) {
311311
// This is a valid vector format with custom separator
@@ -324,10 +324,10 @@ void validateSpecifier(FormatSpecifier spec) {
324324
if (spec.vectorFlag) {
325325
// Vector flag is only valid with certain conversions
326326
String validVectorConversions = "diouxXbB"; // Remove 's'
327-
System.err.println("DEBUG: Checking vector conversion '" + spec.conversionChar +
328-
"' in '" + validVectorConversions + "'");
329-
if (validVectorConversions.indexOf(spec.conversionChar) < 0) {
330-
System.err.println("DEBUG: Setting invalid for vector format");
327+
// System.err.println("DEBUG: Checking vector conversion '" + spec.conversionChar +
328+
// "' in '" + validVectorConversions + "'");
329+
if (validVectorConversions.indexOf(spec.conversionChar) < 0) {
330+
// System.err.println("DEBUG: Setting invalid for vector format");
331331
spec.isValid = false;
332332
spec.errorMessage = "INVALID";
333333
return;

0 commit comments

Comments
 (0)