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

Side by Side Diff: pkg/analyzer/lib/dart/ast/ast.dart

Issue 1672383002: Add comments to public libraries (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/dart/ast/visitor.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /**
6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the
7 * syntactic (as opposed to semantic) structure of Dart code. The semantic
8 * structure of the code is modeled by the
9 * [element model](../element/element.dart).
10 *
11 * An AST consists of nodes (instances of a subclass of [AstNode]). The nodes
12 * are organized in a tree structure in which the children of a node are the
13 * smaller syntactic units from which the node is composed. For example, a
14 * binary expression consists of two sub-expressions (the operands) and an
15 * operator. The two expressions are represented as nodes. The operator is not
16 * represented as a node.
17 *
18 * The AST is constructed by the parser based on the sequence of tokens produced
19 * by the scanner. Most nodes provide direct access to the tokens used to build
20 * the node. For example, the token for the operator in a binary expression can
21 * be accessed from the node representing the binary expression.
22 *
23 * While any node can theoretically be the root of an AST structure, almost all
24 * of the AST structures known to the analyzer have a [CompilationUnit] as the
25 * root of the structure. A compilation unit represents all of the Dart code in
26 * a single file.
27 *
28 * An AST can be either unresolved or resolved. When an AST is unresolved
29 * certain properties will not have been computed and the accessors for those
30 * properties will return `null`. The documentation for those getters should
31 * describe that this is a possibility.
32 *
33 * When an AST is resolved, the identifiers in the AST will be associated with
34 * the elements that they refer to and every expression in the AST will have a
35 * type associated with it.
36 */
5 library analyzer.dart.ast.ast; 37 library analyzer.dart.ast.ast;
6 38
7 import 'package:analyzer/dart/element/element.dart'; 39 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/dart/element/type.dart'; 40 import 'package:analyzer/dart/element/type.dart';
9 import 'package:analyzer/src/dart/ast/ast.dart'; 41 import 'package:analyzer/src/dart/ast/ast.dart';
10 import 'package:analyzer/src/dart/element/element.dart' show AuxiliaryElements; 42 import 'package:analyzer/src/dart/element/element.dart' show AuxiliaryElements;
11 import 'package:analyzer/src/generated/java_core.dart'; 43 import 'package:analyzer/src/generated/java_core.dart';
12 import 'package:analyzer/src/generated/java_engine.dart'; 44 import 'package:analyzer/src/generated/java_engine.dart';
13 import 'package:analyzer/src/generated/scanner.dart'; 45 import 'package:analyzer/src/generated/scanner.dart';
14 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source; 46 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source;
(...skipping 7964 matching lines...) Expand 10 before | Expand all | Expand 10 after
7979 /** 8011 /**
7980 * Return the 'yield' keyword. 8012 * Return the 'yield' keyword.
7981 */ 8013 */
7982 Token get yieldKeyword; 8014 Token get yieldKeyword;
7983 8015
7984 /** 8016 /**
7985 * Return the 'yield' keyword to the given [token]. 8017 * Return the 'yield' keyword to the given [token].
7986 */ 8018 */
7987 void set yieldKeyword(Token token); 8019 void set yieldKeyword(Token token);
7988 } 8020 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/dart/ast/visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698