@@ -10,123 +10,28 @@ nextpage:
10
10
title : Built-in types
11
11
---
12
12
13
- The following table lists the words that the Dart language treats specially.
14
-
15
- {% assign ckw = '  ; <sup title =" contextual keyword " alt =" contextual keyword " >1</sup >' %}
16
- {% assign bii = '  ; <sup title =" built-in-identifier " alt =" built-in-identifier " >2</sup >' %}
17
- {% assign lrw = '  ; <sup title =" limited reserved word " alt =" limited reserved word " >3</sup >' %}
18
-
19
- <div class =" table-wrapper " >
20
-
21
- |||||
22
- | -| -| -| -|
23
- | [ abstract] [ ] {{bii}} | [ else] [ ] | [ import] [ ] {{bii}} | [ show] [ ] {{ckw}} |
24
- | [ as] [ ] {{bii}} | [ enum] [ ] | [ in] [ ] | [ static] [ ] {{bii}} |
25
- | [ assert] [ ] | [ export] [ ] {{bii}} | [ interface] [ ] {{bii}} | [ super] [ ] |
26
- | [ async] [ ] {{ckw}} | [ extends] [ ] | [ is] [ ] | [ switch] [ ] |
27
- | [ await] [ ] {{lrw}} | [ extension] [ ] {{bii}} | [ late] [ ] {{bii}} | [ sync] [ ] {{ckw}} |
28
- | [ base] [ ] {{bii}} | [ external] [ ] {{bii}} | [ library] [ ] {{bii}} | [ this] [ ] |
29
- | [ break] [ ] | [ factory] [ ] {{bii}} | [ mixin] [ ] {{bii}} | [ throw] [ ] |
30
- | [ case] [ ] | [ false] [ ] | [ new] [ ] | [ true] [ ] |
31
- | [ catch] [ ] | [ final (variable)] [ ] | [ null] [ ] | [ try] [ ] |
32
- | [ class] [ ] | [ final (class)] [ ] {{bii}} | [ on] [ ] {{ckw}} | [ type] [ ] {{lrw}} |
33
- | [ const] [ ] | [ finally] [ ] | [ operator] [ ] {{bii}} | [ typedef] [ ] {{bii}} |
34
- | [ continue] [ ] | [ for] [ ] | [ part] [ ] {{bii}} | [ var] [ ] |
35
- | [ covariant] [ ] {{bii}} | [ Function] [ ] {{bii}} | [ required] [ ] {{bii}} | [ void] [ ] |
36
- | [ default] [ ] | [ get] [ ] {{bii}} | [ rethrow] [ ] | [ when] [ ] |
37
- | [ deferred] [ ] {{bii}} | [ hide] [ ] {{ckw}} | [ return] [ ] | [ while] [ ] |
38
- | [ do] [ ] | [ if] [ ] | [ sealed] [ ] {{bii}} | [ with] [ ] |
39
- | [ dynamic] [ ] {{bii}} | [ implements] [ ] {{bii}} | [ set] [ ] {{bii}} | [ yield] [ ] {{lrw}} |
40
-
41
- {:.table .table-striped .nowrap}
42
- </div >
43
-
44
- [ abstract ] : /language/class-modifiers#abstract
45
- [ as ] : /language/operators#type-test-operators
46
- [ assert ] : /language/error-handling#assert
47
- [ async ] : /language/async
48
- [ await ] : /language/async
49
- [ base ] : /language/class-modifiers#base
50
- [ break ] : /language/loops#break-and-continue
51
- [ case ] : /language/branches#switch
52
- [ catch ] : /language/error-handling#catch
53
- [ class ] : /language/classes#instance-variables
54
- [ const ] : /language/variables#final-and-const
55
- [ continue ] : /language/loops#break-and-continue
56
- [ covariant ] : /guides/language/sound-problems#the-covariant-keyword
57
- [ default ] : /language/branches#switch
58
- [ deferred ] : /language/libraries#lazily-loading-a-library
59
- [ do ] : /language/loops#while-and-do-while
60
- [ dynamic ] : /language#important-concepts
61
- [ else ] : /language/branches#if
62
- [ enum ] : /language/enums
63
- [ export ] : /guides/libraries/create-packages
64
- [ extends ] : /language/extend
65
- [ extension ] : /language/extension-methods
66
- [ external ] : /language/functions#external
67
- [ factory ] : /language/constructors#factory-constructors
68
- [ false ] : /language/built-in-types#booleans
69
- [ final (variable) ] : /language/variables#final-and-const
70
- [ final (class) ] : /language/class-modifiers#final
71
- [ finally ] : /language/error-handling#finally
72
- [ for ] : /language/loops#for-loops
73
- [ Function ] : /language/functions
74
- [ get ] : /language/methods#getters-and-setters
75
- [ hide ] : /language/libraries#importing-only-part-of-a-library
76
- [ if ] : /language/branches#if
77
- [ implements ] : /language/classes#implicit-interfaces
78
- [ import ] : /language/libraries#using-libraries
79
- [ in ] : /language/loops#for-loops
80
- [ interface ] : /language/class-modifiers#interface
81
- [ is ] : /language/operators#type-test-operators
82
- [ late ] : /language/variables#late-variables
83
- [ library ] : /language/libraries
84
- [ mixin ] : /language/mixins
85
- [ new ] : /language/classes#using-constructors
86
- [ null ] : /language/variables#default-value
87
- [ on ] : /language/error-handling#catch
88
- [ operator ] : /language/methods#operators
89
- [ part ] : /guides/libraries/create-packages#organizing-a-package
90
- [ required ] : /language/functions#named-parameters
91
- [ rethrow ] : /language/error-handling#catch
92
- [ return ] : /language/functions#return-values
93
- [ sealed ] : /language/class-modifiers#sealed
94
- [ set ] : /language/methods#getters-and-setters
95
- [ show ] : /language/libraries#importing-only-part-of-a-library
96
- [ static ] : /language/classes#class-variables-and-methods
97
- [ super ] : /language/extend
98
- [ switch ] : /language/branches#switch
99
- [ sync ] : /language/functions#generators
100
- [ this ] : /language/constructors
101
- [ throw ] : /language/error-handling#throw
102
- [ true ] : /language/built-in-types#booleans
103
- [ try ] : /language/error-handling#catch
104
- [ type ] : /language/extension-types
105
- [ typedef ] : /language/typedefs
106
- [ var ] : /language/variables
107
- [ void ] : /language/built-in-types
108
- [ when ] : /language/branches#when
109
- [ with ] : /language/mixins
110
- [ while ] : /language/loops#while-and-do-while
111
- [ yield ] : /language/functions#generators
112
-
113
- Avoid using these words as identifiers.
114
- However, if necessary, the keywords marked with superscripts can be identifiers:
115
-
116
- * Words with the superscript ** 1** are ** contextual keywords** ,
117
- which have meaning only in specific places.
118
- They're valid identifiers everywhere.
119
-
120
- * Words with the superscript ** 2** are ** built-in identifiers** .
121
- These keywords are valid identifiers in most places,
122
- but they can't be used as class or type names, or as import prefixes.
123
-
124
- * Words with the superscript ** 3** are limited reserved words related to
125
- [ asynchrony support] [ ] .
126
- You can't use ` await ` or ` yield ` as an identifier
127
- in any function body marked with ` async ` , ` async* ` , or ` sync* ` .
128
-
129
- All other words in the table are ** reserved words** ,
130
- which can't be identifiers.
131
-
132
- [ asynchrony support ] : /language/async
13
+ {% assign ckw = '  ; <sup >1</sup >' %}
14
+ {% assign bii = '  ; <sup >2</sup >' %}
15
+
16
+ The following table lists the words
17
+ that the Dart language reserves for its own use.
18
+ Don't use these terms as identifiers unless the term notes an exception.
19
+ To learn more about identifier usage, click on the term.
20
+
21
+ <table class =" table table-striped " >
22
+
23
+ {% tablerow keyword in keywords cols: 4 %}
24
+ <a href =" {{keyword.link}} " >{{keyword.term}}</a >
25
+ {%- case keyword.type %}
26
+ {% when 'bit' %}{{bii}}
27
+ {% when 'context' %}{{ckw}}
28
+ {% endcase %}
29
+ {% endtablerow %}
30
+ </table >
31
+
32
+ {{ckw}} These keywords can be used as an identifier
33
+ depending on ** context** .
34
+
35
+ {{bii}} These keywords can't be used as class names, type names,
36
+ or import prefixes. They can be used as identifiers in all other
37
+ circumstances.
0 commit comments