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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/builder/AngularCompilationUnitBuilder.java

Issue 128443003: Analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 6 years, 11 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 | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/LocalVariableElementImpl.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/builder/AngularCompilationUnitBuilder.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/builder/AngularCompilationUnitBuilder.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/builder/AngularCompilationUnitBuilder.java
index a3edb699aade5b288009efc16d33e78508f6a4a8..c3fef19b286f3271455124f6a503f38ca50d5197 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/builder/AngularCompilationUnitBuilder.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/builder/AngularCompilationUnitBuilder.java
@@ -125,6 +125,25 @@ public class AngularCompilationUnitBuilder {
return false;
}
+ public static boolean isTagName(String s) {
+ if (s == null || s.length() == 0) {
+ return false;
+ }
+ int sz = s.length();
+ for (int i = 0; i < sz; i++) {
+ char c = s.charAt(i);
+ if (!Character.isLetter(c)) {
+ if (i == 0) {
+ return false;
+ }
+ if (!Character.isDigit(c) && c != '-') {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
/**
* Parses given selector text and returns {@link AngularSelector}. May be {@code null} if cannot
* parse.
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/element/LocalVariableElementImpl.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698