Skip to content

Commit

Permalink
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/string/modulo_tags.txt
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@ fails:String#% doesn't return subclass instances when called on a subclass
fails:String#% always taints the result when the format string is tainted
fails:String#% supports binary formats using %b for positive numbers
fails:String#% supports binary formats using %b for negative numbers
fails:String#% supports binary formats using %B with same behaviour as %b except for using 0B instead of 0b for #
fails:String#% supports character formats using %c
fails:String#% supports single character strings as argument for %c
fails:String#% raises an exception for multiple character strings as argument for %c
Original file line number Diff line number Diff line change
@@ -27,6 +27,6 @@ flag : SPACE
| MINUS
| STAR
| HASH
| NUMBER DOLLAR ;
| argumentIndex=NUMBER DOLLAR ;

literal : LITERAL ;
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ public void exitFormat(PrintfParser.FormatContext ctx) {
int zeroPadding = DEFAULT;
boolean hasPlusFlag = false;
boolean useAlternativeFormat = false;
int absoluteArgumentIndex = DEFAULT;

for (int n = 0; n < ctx.flag().size(); n++) {
final PrintfParser.FlagContext flag = ctx.flag(n);
@@ -113,6 +114,8 @@ public void exitFormat(PrintfParser.FormatContext ctx) {
hasPlusFlag = true;
} else if (flag.HASH() != null) {
useAlternativeFormat = true;
} else if (flag.argumentIndex != null) {
absoluteArgumentIndex = Integer.parseInt(flag.argumentIndex.getText());
} else {
throw new UnsupportedOperationException();
}

0 comments on commit 1b428a7

Please sign in to comment.