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

Side by Side Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10890007: Remove more warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 interface Visitor<R> { 5 interface Visitor<R> {
6 R visitBlock(Block node); 6 R visitBlock(Block node);
7 R visitBreakStatement(BreakStatement node); 7 R visitBreakStatement(BreakStatement node);
8 R visitCascade(Cascade node); 8 R visitCascade(Cascade node);
9 R visitCascadeReceiver(CascadeReceiver node); 9 R visitCascadeReceiver(CascadeReceiver node);
10 R visitCaseMatch(CaseMatch node); 10 R visitCaseMatch(CaseMatch node);
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 1134
1135 bool isStatic() => (flags & FLAG_STATIC) != 0; 1135 bool isStatic() => (flags & FLAG_STATIC) != 0;
1136 bool isAbstract() => (flags & FLAG_ABSTRACT) != 0; 1136 bool isAbstract() => (flags & FLAG_ABSTRACT) != 0;
1137 bool isFinal() => (flags & FLAG_FINAL) != 0; 1137 bool isFinal() => (flags & FLAG_FINAL) != 0;
1138 bool isVar() => (flags & FLAG_VAR) != 0; 1138 bool isVar() => (flags & FLAG_VAR) != 0;
1139 bool isConst() => (flags & FLAG_CONST) != 0; 1139 bool isConst() => (flags & FLAG_CONST) != 0;
1140 bool isFactory() => (flags & FLAG_FACTORY) != 0; 1140 bool isFactory() => (flags & FLAG_FACTORY) != 0;
1141 bool isExternal() => (flags & FLAG_EXTERNAL) != 0; 1141 bool isExternal() => (flags & FLAG_EXTERNAL) != 0;
1142 1142
1143 /** 1143 /**
1144 * Use this to check if the declaration is either explicitly or implicitly 1144 * Use this to check if the declaration is either explicitly or implicitly
1145 * final. 1145 * final.
1146 */ 1146 */
1147 bool isFinalOrConst() => isFinal() || isConst(); 1147 bool isFinalOrConst() => isFinal() || isConst();
1148 1148
1149 String toString() { 1149 String toString() {
1150 LinkBuilder<String> builder = new LinkBuilder<String>(); 1150 LinkBuilder<String> builder = new LinkBuilder<String>();
1151 if (isStatic()) builder.addLast('static'); 1151 if (isStatic()) builder.addLast('static');
1152 if (isAbstract()) builder.addLast('abstract'); 1152 if (isAbstract()) builder.addLast('abstract');
1153 if (isFinal()) builder.addLast('final'); 1153 if (isFinal()) builder.addLast('final');
1154 if (isVar()) builder.addLast('var'); 1154 if (isVar()) builder.addLast('var');
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 1563
1564 final Token beginToken; 1564 final Token beginToken;
1565 final Token endToken; 1565 final Token endToken;
1566 1566
1567 ScriptTag(this.tag, this.argument, this.prefixIdentifier, this.prefix, 1567 ScriptTag(this.tag, this.argument, this.prefixIdentifier, this.prefix,
1568 this.beginToken, this.endToken); 1568 this.beginToken, this.endToken);
1569 1569
1570 bool isImport() => tag.source == const SourceString("import"); 1570 bool isImport() => tag.source == const SourceString("import");
1571 bool isSource() => tag.source == const SourceString("source"); 1571 bool isSource() => tag.source == const SourceString("source");
1572 bool isLibrary() => tag.source == const SourceString("library"); 1572 bool isLibrary() => tag.source == const SourceString("library");
1573 bool isResource() => tag.source == const SourceString("resource");
1574 1573
1575 ScriptTag asScriptTag() => this; 1574 ScriptTag asScriptTag() => this;
1576 1575
1577 accept(Visitor visitor) => visitor.visitScriptTag(this); 1576 accept(Visitor visitor) => visitor.visitScriptTag(this);
1578 1577
1579 visitChildren(Visitor visitor) { 1578 visitChildren(Visitor visitor) {
1580 tag.accept(visitor); 1579 tag.accept(visitor);
1581 argument.accept(visitor); 1580 argument.accept(visitor);
1582 if (prefixIdentifier !== null) prefixIdentifier.accept(visitor); 1581 if (prefixIdentifier !== null) prefixIdentifier.accept(visitor);
1583 if (prefix !== null) prefix.accept(visitor); 1582 if (prefix !== null) prefix.accept(visitor);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 * argument). 1761 * argument).
1763 * 1762 *
1764 * TODO(ahe): This method is controversial, the team needs to discuss 1763 * TODO(ahe): This method is controversial, the team needs to discuss
1765 * if top-level methods are acceptable and what naming conventions to 1764 * if top-level methods are acceptable and what naming conventions to
1766 * use. 1765 * use.
1767 */ 1766 */
1768 initializerDo(Node node, f(Node node)) { 1767 initializerDo(Node node, f(Node node)) {
1769 SendSet send = node.asSendSet(); 1768 SendSet send = node.asSendSet();
1770 if (send !== null) return f(send.arguments.head); 1769 if (send !== null) return f(send.arguments.head);
1771 } 1770 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/scanner/scanner_task.dart ('k') | lib/compiler/implementation/tree/prettyprint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698