forked from jasder/antlr
Remove TokenStreamRewriter.getOriginalText() (use rewriter.getSource().getText() instead)
This commit is contained in:
parent
a85f1c17a1
commit
bbd61dca35
|
@ -321,15 +321,6 @@ public class TokenStreamRewriter {
|
|||
return is;
|
||||
}
|
||||
|
||||
public String getOriginalText() {
|
||||
return tokens.getText();
|
||||
}
|
||||
|
||||
/** The text collected from all tokens in the input token stream */
|
||||
public String getOriginalText(Interval interval) {
|
||||
return tokens.getText(interval);
|
||||
}
|
||||
|
||||
/** Return the text from the original tokens altered per the
|
||||
* instructions given to this rewriter.
|
||||
*/
|
||||
|
|
|
@ -163,7 +163,7 @@ public class TestTokenStreamRewriter extends BaseTest {
|
|||
stream.fill();
|
||||
// replace 3 * 0 with 0
|
||||
|
||||
String result = tokens.getOriginalText();
|
||||
String result = tokens.getSource().getText();
|
||||
String expecting = "x = 3 * 0;";
|
||||
assertEquals(expecting, result);
|
||||
|
||||
|
@ -198,7 +198,7 @@ public class TestTokenStreamRewriter extends BaseTest {
|
|||
stream.fill();
|
||||
TokenStreamRewriter tokens = new TokenStreamRewriter(stream);
|
||||
|
||||
String result = tokens.getOriginalText();
|
||||
String result = tokens.getSource().getText();
|
||||
String expecting = "x = 3 * 0 + 2 * 0;";
|
||||
assertEquals(expecting, result);
|
||||
|
||||
|
|
Loading…
Reference in New Issue