| Index: frog/leg/scanner/token.dart
|
| diff --git a/frog/leg/scanner/token.dart b/frog/leg/scanner/token.dart
|
| index cc3c3285c05720e88cecd56eb66012bca8aba389..3ce6830118643ae2f47cbc6971c56e401c7401d4 100644
|
| --- a/frog/leg/scanner/token.dart
|
| +++ b/frog/leg/scanner/token.dart
|
| @@ -128,6 +128,10 @@ interface SourceString extends Hashable default StringWrapper {
|
| int get length();
|
|
|
| void printOn(StringBuffer sb);
|
| + void printSubstringOn(StringBuffer sb, int from, int to);
|
| +
|
| + int charCodeAt(int i);
|
| + String operator[](int index);
|
|
|
| String get stringValue();
|
| }
|
| @@ -149,6 +153,14 @@ class StringWrapper implements SourceString {
|
| sb.add(stringValue);
|
| }
|
|
|
| + void printSubstringOn(StringBuffer sb, int from, int to) {
|
| + if (from >= to) return;
|
| + sb.add(stringValue.substring(from, to));
|
| + }
|
| +
|
| + int charCodeAt(int index) => stringValue.charCodeAt(index);
|
| + String operator[](int index) => stringValue[index];
|
| +
|
| String toString() => stringValue;
|
| }
|
|
|
|
|