| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library fasta.scanner.string_canonicalizer; | 5 library fasta.scanner.string_canonicalizer; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 class Node { | 9 class Node { |
| 10 var /* String | List<int> */ data; | 10 var /* String | List<int> */ data; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 if (data is String) | 108 if (data is String) |
| 109 payload = data.substring(start, end); | 109 payload = data.substring(start, end); |
| 110 else | 110 else |
| 111 payload = decode(data, start, end, asciiOnly); | 111 payload = decode(data, start, end, asciiOnly); |
| 112 _nodes[index] = new Node(data, start, end, payload, s); | 112 _nodes[index] = new Node(data, start, end, payload, s); |
| 113 _count++; | 113 _count++; |
| 114 return payload; | 114 return payload; |
| 115 } | 115 } |
| 116 | 116 |
| 117 clear() { | 117 clear() { |
| 118 _size = INITIAL_SIZE; |
| 118 _nodes = new List<Node>(_size); | 119 _nodes = new List<Node>(_size); |
| 120 _count = 0; |
| 119 } | 121 } |
| 120 } | 122 } |
| OLD | NEW |