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

Side by Side Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/html/HtmlTagInfoBuilder.java

Issue 82903007: Improved HTML parsing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean-up Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, the Dart project authors. 2 * Copyright (c) 2013, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
11 * or implied. See the License for the specific language governing permissions a nd limitations under 11 * or implied. See the License for the specific language governing permissions a nd limitations under
12 * the License. 12 * the License.
13 */ 13 */
14 package com.google.dart.engine.internal.html; 14 package com.google.dart.engine.internal.html;
15 15
16 import com.google.dart.engine.html.ast.HtmlScriptTagNode;
16 import com.google.dart.engine.html.ast.HtmlUnit; 17 import com.google.dart.engine.html.ast.HtmlUnit;
17 import com.google.dart.engine.html.ast.XmlAttributeNode; 18 import com.google.dart.engine.html.ast.XmlAttributeNode;
18 import com.google.dart.engine.html.ast.XmlTagNode; 19 import com.google.dart.engine.html.ast.XmlTagNode;
19 import com.google.dart.engine.html.ast.visitor.XmlVisitor; 20 import com.google.dart.engine.html.ast.visitor.XmlVisitor;
20 21
21 import java.util.HashMap; 22 import java.util.HashMap;
22 import java.util.HashSet; 23 import java.util.HashSet;
23 import java.util.Map; 24 import java.util.Map;
24 25
25 /** 26 /**
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 String[] allTags = tagSet.toArray(new String[tagSet.size()]); 70 String[] allTags = tagSet.toArray(new String[tagSet.size()]);
70 HashMap<String, String[]> classToTagsMap = new HashMap<String, String[]>(idM ap.size()); 71 HashMap<String, String[]> classToTagsMap = new HashMap<String, String[]>(idM ap.size());
71 for (Map.Entry<String, HashSet<String>> entry : classMap.entrySet()) { 72 for (Map.Entry<String, HashSet<String>> entry : classMap.entrySet()) {
72 HashSet<String> tags = entry.getValue(); 73 HashSet<String> tags = entry.getValue();
73 classToTagsMap.put(entry.getKey(), tags.toArray(new String[tags.size()])); 74 classToTagsMap.put(entry.getKey(), tags.toArray(new String[tags.size()]));
74 } 75 }
75 return new HtmlTagInfo(allTags, idMap, classToTagsMap); 76 return new HtmlTagInfo(allTags, idMap, classToTagsMap);
76 } 77 }
77 78
78 @Override 79 @Override
80 public Void visitHtmlScriptTagNode(HtmlScriptTagNode node) {
81 return visitXmlTagNode(node);
82 }
83
84 @Override
79 public Void visitHtmlUnit(HtmlUnit node) { 85 public Void visitHtmlUnit(HtmlUnit node) {
80 node.visitChildren(this); 86 node.visitChildren(this);
81 return null; 87 return null;
82 } 88 }
83 89
84 @Override 90 @Override
85 public Void visitXmlAttributeNode(XmlAttributeNode node) { 91 public Void visitXmlAttributeNode(XmlAttributeNode node) {
86 return null; 92 return null;
87 } 93 }
88 94
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // */ 155 // */
150 // private void reportError(ErrorCode errorCode, int offset, int length, Object ... arguments) { 156 // private void reportError(ErrorCode errorCode, int offset, int length, Object ... arguments) {
151 // errorListener.onError(new AnalysisError( 157 // errorListener.onError(new AnalysisError(
152 // htmlElement.getSource(), 158 // htmlElement.getSource(),
153 // offset, 159 // offset,
154 // length, 160 // length,
155 // errorCode, 161 // errorCode,
156 // arguments)); 162 // arguments));
157 // } 163 // }
158 } 164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698