Skip to content

Commit

Permalink
ignore old lang-tour, add manual redirects, add excerpt ignore to new…
Browse files Browse the repository at this point in the history
… pages
  • Loading branch information
MaryaBelanger committed Feb 22, 2023
1 parent 4c38f9e commit 6a0254a
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 105 deletions.
218 changes: 113 additions & 105 deletions src/_guides/language/language-tour.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/language/async.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Asychrony support
description: Information on writing asynchronous code in Dart.
---

<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g; / *\/\/\s+ignore:[^\n]+//g; /([A-Z]\w*)\d\b/$1/g"?>

Dart libraries are full of functions that
return [`Future`][] or [`Stream`][] objects.
These functions are _asynchronous_:
Expand Down
2 changes: 2 additions & 0 deletions src/language/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Classes
description: Summary of classes, class instances, and their members.
---

<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g; / *\/\/\s+ignore:[^\n]+//g; /([A-Z]\w*)\d\b/$1/g"?>

Dart is an object-oriented language with classes and mixin-based
inheritance. Every object is an instance of a class, and all classes
except `Null` descend from [`Object`][].
Expand Down
2 changes: 2 additions & 0 deletions src/language/constructors.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Constructors
description: Everything about using constructors in Dart.
---

<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g; / *\/\/\s+ignore:[^\n]+//g; /([A-Z]\w*)\d\b/$1/g"?>

Declare a constructor by creating a function with the same name as its
class (plus, optionally, an additional identifier as described in
[Named constructors](#named-constructors)).
Expand Down
2 changes: 2 additions & 0 deletions src/language/generics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Generics
description: Learn about generic types in Dart.
---

<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g; / *\/\/\s+ignore:[^\n]+//g; /([A-Z]\w*)\d\b/$1/g"?>

If you look at the API documentation for the basic array type,
[`List`][], you’ll see that the
type is actually `List<E>`. The \<...\> notation marks List as a
Expand Down
2 changes: 2 additions & 0 deletions src/language/mixins.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Mixins
description: Learn how to add to features to a class in Dart.
---

<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g; / *\/\/\s+ignore:[^\n]+//g; /([A-Z]\w*)\d\b/$1/g"?>

Mixins are a way of reusing a class's code in multiple class
hierarchies.

Expand Down
2 changes: 2 additions & 0 deletions src/language/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Operators
description: Learn about the operators Dart supports.
---

<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g; / *\/\/\s+ignore:[^\n]+//g; /([A-Z]\w*)\d\b/$1/g"?>

<a name="operators"></a>

Dart supports the operators shown in the following table.
Expand Down
2 changes: 2 additions & 0 deletions src/language/typedefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Typedefs
description: Learn about type aliases in Dart.
---

<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g; / *\/\/\s+ignore:[^\n]+//g; /([A-Z]\w*)\d\b/$1/g"?>

A type alias—often called a _typedef_ because
it's declared with the keyword `typedef`—is
a concise way to refer to a type.
Expand Down
2 changes: 2 additions & 0 deletions src/language/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Variables
description: Learn about variables in Dart.
---

<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g; / *\/\/\s+ignore:[^\n]+//g; /([A-Z]\w*)\d\b/$1/g"?>

Here’s an example of creating a variable and initializing it:

<?code-excerpt "misc/lib/language_tour/variables.dart (var-decl)"?>
Expand Down

0 comments on commit 6a0254a

Please sign in to comment.