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

Unified Diff: vm/scanner.cc

Issue 8500006: Library prefix should be an identifier (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years, 1 month 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
« vm/parser.cc ('K') | « vm/scanner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/scanner.cc
===================================================================
--- vm/scanner.cc (revision 1717)
+++ vm/scanner.cc (working copy)
@@ -117,6 +117,22 @@
}
+bool Scanner::IsIdent(const String& str) {
+ if (!str.IsOneByteString()) {
+ return false;
+ }
+ if (str.Length() == 0 || !IsIdentStartChar(str.CharAt(0))) {
+ return false;
+ }
+ for (int i = 1; i < str.Length(); i++) {
+ if (!IsIdentChar(str.CharAt(i))) {
+ return false;
+ }
+ }
+ return true;
+}
+
+
void Scanner::ReadChar() {
if (lookahead_pos_ < source_length_) {
if (c0_ == '\n') {
« vm/parser.cc ('K') | « vm/scanner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698