(Object reader, Object doublequote, Object opts, Object pendingForms)
| 541 | static StringReader stringrdr = new StringReader(); |
| 542 | |
| 543 | public Object invoke(Object reader, Object doublequote, Object opts, Object pendingForms) { |
| 544 | StringBuilder sb = new StringBuilder(); |
| 545 | Reader r = (Reader) reader; |
| 546 | for(int ch = read1(r); ch != '"'; ch = read1(r)) |
| 547 | { |
| 548 | if(ch == -1) |
| 549 | throw Util.runtimeException("EOF while reading regex"); |
| 550 | sb.append( (char) ch ); |
| 551 | if(ch == '\\') //escape |
| 552 | { |
| 553 | ch = read1(r); |
| 554 | if(ch == -1) |
| 555 | throw Util.runtimeException("EOF while reading regex"); |
| 556 | sb.append( (char) ch ) ; |
| 557 | } |
| 558 | } |
| 559 | return Pattern.compile(sb.toString()); |
| 560 | } |
| 561 | } |
| 562 | |
| 563 | public static class StringReader extends AFn{ |
nothing calls this directly
no test coverage detected