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

Side by Side Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/html/ast/visitor/RecursiveXmlVisitor.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.html.ast.visitor; 14 package com.google.dart.engine.html.ast.visitor;
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 20
20 /** 21 /**
21 * Instances of the class {@code RecursiveXmlVisitor} implement an XML visitor t hat will recursively 22 * Instances of the class {@code RecursiveXmlVisitor} implement an XML visitor t hat will recursively
22 * visit all of the nodes in an XML structure. For example, using an instance of this class to visit 23 * visit all of the nodes in an XML structure. For example, using an instance of this class to visit
23 * a {@link XmlTagNode} will also cause all of the contained {@link XmlAttribute Node}s and 24 * a {@link XmlTagNode} will also cause all of the contained {@link XmlAttribute Node}s and
24 * {@link XmlTagNode}s to be visited. 25 * {@link XmlTagNode}s to be visited.
25 * <p> 26 * <p>
26 * Subclasses that override a visit method must either invoke the overridden vis it method or must 27 * Subclasses that override a visit method must either invoke the overridden vis it method or must
27 * explicitly ask the visited node to visit its children. Failure to do so will cause the children 28 * explicitly ask the visited node to visit its children. Failure to do so will cause the children
28 * of the visited node to not be visited. 29 * of the visited node to not be visited.
29 * 30 *
30 * @coverage dart.engine.html 31 * @coverage dart.engine.html
31 */ 32 */
32 public class RecursiveXmlVisitor<R> implements XmlVisitor<R> { 33 public class RecursiveXmlVisitor<R> implements XmlVisitor<R> {
34 @Override
35 public R visitHtmlScriptTagNode(HtmlScriptTagNode node) {
36 node.visitChildren(this);
37 return null;
38 }
33 39
34 @Override 40 @Override
35 public R visitHtmlUnit(HtmlUnit node) { 41 public R visitHtmlUnit(HtmlUnit node) {
36 node.visitChildren(this); 42 node.visitChildren(this);
37 return null; 43 return null;
38 } 44 }
39 45
40 @Override 46 @Override
41 public R visitXmlAttributeNode(XmlAttributeNode node) { 47 public R visitXmlAttributeNode(XmlAttributeNode node) {
42 node.visitChildren(this); 48 node.visitChildren(this);
43 return null; 49 return null;
44 } 50 }
45 51
46 @Override 52 @Override
47 public R visitXmlTagNode(XmlTagNode node) { 53 public R visitXmlTagNode(XmlTagNode node) {
48 node.visitChildren(this); 54 node.visitChildren(this);
49 return null; 55 return null;
50 } 56 }
51 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698