Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: frog/leg/scanner/byte_array_scanner.dart

Issue 9873021: Move frog/leg to lib/compiler/implementation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/leg/scanner/array_based_scanner.dart ('k') | frog/leg/scanner/byte_strings.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/scanner/byte_array_scanner.dart
===================================================================
--- frog/leg/scanner/byte_array_scanner.dart (revision 5925)
+++ frog/leg/scanner/byte_array_scanner.dart (working copy)
@@ -1,37 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * Scanner that reads from a byte array and creates tokens that points
- * to the same array.
- */
-class ByteArrayScanner extends ArrayBasedScanner<ByteString> {
- final List<int> bytes;
-
- ByteArrayScanner(List<int> this.bytes) : super();
-
- int nextByte() => byteAt(++byteOffset);
-
- int peek() => byteAt(byteOffset + 1);
-
- int byteAt(int index) => bytes[index];
-
- AsciiString asciiString(int start, int offset) {
- return AsciiString.of(bytes, start, byteOffset - start + offset);
- }
-
- Utf8String utf8String(int start, int offset) {
- return Utf8String.of(bytes, start, byteOffset - start + offset + 1);
- }
-
- void appendByteStringToken(PrecedenceInfo info, ByteString value) {
- tail.next = new ByteStringToken(info, value, tokenStart);
- tail = tail.next;
- }
-
- // This method should be equivalent to the one in super. However,
- // this is a *HOT* method and Dart VM performs better if it is easy
- // to inline.
- int advance() => bytes[++byteOffset];
-}
« no previous file with comments | « frog/leg/scanner/array_based_scanner.dart ('k') | frog/leg/scanner/byte_strings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698