|
| 1 | +func ignore(_: Int, _: String) { |
| 2 | +} |
| 3 | + |
| 4 | +func ignore(first _: Int, second _: String) { |
| 5 | +} |
| 6 | + |
| 7 | +let ignoreClosure: (Int, String) -> Void = { _, _ in |
| 8 | +} |
| 9 | + |
| 10 | +let ignoreTypedClosure = { (_: Int, _: String) in |
| 11 | +} |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +sourceFile |
| 16 | + endOfFileToken: endOfFile |
| 17 | + statements: |
| 18 | + codeBlockItem |
| 19 | + item: |
| 20 | + functionDecl |
| 21 | + attributes: |
| 22 | + body: |
| 23 | + codeBlock |
| 24 | + leftBrace: { |
| 25 | + rightBrace: } |
| 26 | + statements: |
| 27 | + modifiers: |
| 28 | + name: identifier "ignore" |
| 29 | + signature: |
| 30 | + functionSignature |
| 31 | + parameterClause: |
| 32 | + functionParameterClause |
| 33 | + leftParen: ( |
| 34 | + rightParen: ) |
| 35 | + parameters: |
| 36 | + functionParameter |
| 37 | + colon: : |
| 38 | + attributes: |
| 39 | + modifiers: |
| 40 | + trailingComma: , |
| 41 | + type: |
| 42 | + identifierType |
| 43 | + name: identifier "Int" |
| 44 | + firstName: _ |
| 45 | + functionParameter |
| 46 | + colon: : |
| 47 | + attributes: |
| 48 | + modifiers: |
| 49 | + type: |
| 50 | + identifierType |
| 51 | + name: identifier "String" |
| 52 | + firstName: _ |
| 53 | + funcKeyword: func |
| 54 | + codeBlockItem |
| 55 | + item: |
| 56 | + functionDecl |
| 57 | + attributes: |
| 58 | + body: |
| 59 | + codeBlock |
| 60 | + leftBrace: { |
| 61 | + rightBrace: } |
| 62 | + statements: |
| 63 | + modifiers: |
| 64 | + name: identifier "ignore" |
| 65 | + signature: |
| 66 | + functionSignature |
| 67 | + parameterClause: |
| 68 | + functionParameterClause |
| 69 | + leftParen: ( |
| 70 | + rightParen: ) |
| 71 | + parameters: |
| 72 | + functionParameter |
| 73 | + colon: : |
| 74 | + attributes: |
| 75 | + modifiers: |
| 76 | + trailingComma: , |
| 77 | + type: |
| 78 | + identifierType |
| 79 | + name: identifier "Int" |
| 80 | + firstName: identifier "first" |
| 81 | + secondName: _ |
| 82 | + functionParameter |
| 83 | + colon: : |
| 84 | + attributes: |
| 85 | + modifiers: |
| 86 | + type: |
| 87 | + identifierType |
| 88 | + name: identifier "String" |
| 89 | + firstName: identifier "second" |
| 90 | + secondName: _ |
| 91 | + funcKeyword: func |
| 92 | + codeBlockItem |
| 93 | + item: |
| 94 | + variableDecl |
| 95 | + attributes: |
| 96 | + modifiers: |
| 97 | + bindingSpecifier: let |
| 98 | + bindings: |
| 99 | + patternBinding |
| 100 | + initializer: |
| 101 | + initializerClause |
| 102 | + equal: = |
| 103 | + value: |
| 104 | + closureExpr |
| 105 | + leftBrace: { |
| 106 | + rightBrace: } |
| 107 | + signature: |
| 108 | + closureSignature |
| 109 | + attributes: |
| 110 | + inKeyword: in |
| 111 | + parameterClause: |
| 112 | + closureShorthandParameter |
| 113 | + name: _ |
| 114 | + trailingComma: , |
| 115 | + closureShorthandParameter |
| 116 | + name: _ |
| 117 | + statements: |
| 118 | + pattern: |
| 119 | + identifierPattern |
| 120 | + identifier: identifier "ignoreClosure" |
| 121 | + typeAnnotation: |
| 122 | + typeAnnotation |
| 123 | + colon: : |
| 124 | + type: |
| 125 | + functionType |
| 126 | + leftParen: ( |
| 127 | + rightParen: ) |
| 128 | + parameters: |
| 129 | + tupleTypeElement |
| 130 | + trailingComma: , |
| 131 | + type: |
| 132 | + identifierType |
| 133 | + name: identifier "Int" |
| 134 | + tupleTypeElement |
| 135 | + type: |
| 136 | + identifierType |
| 137 | + name: identifier "String" |
| 138 | + returnClause: |
| 139 | + returnClause |
| 140 | + arrow: -> |
| 141 | + type: |
| 142 | + identifierType |
| 143 | + name: identifier "Void" |
| 144 | + codeBlockItem |
| 145 | + item: |
| 146 | + variableDecl |
| 147 | + attributes: |
| 148 | + modifiers: |
| 149 | + bindingSpecifier: let |
| 150 | + bindings: |
| 151 | + patternBinding |
| 152 | + initializer: |
| 153 | + initializerClause |
| 154 | + equal: = |
| 155 | + value: |
| 156 | + closureExpr |
| 157 | + leftBrace: { |
| 158 | + rightBrace: } |
| 159 | + signature: |
| 160 | + closureSignature |
| 161 | + attributes: |
| 162 | + inKeyword: in |
| 163 | + parameterClause: |
| 164 | + closureParameterClause |
| 165 | + leftParen: ( |
| 166 | + rightParen: ) |
| 167 | + parameters: |
| 168 | + closureParameter |
| 169 | + colon: : |
| 170 | + attributes: |
| 171 | + modifiers: |
| 172 | + trailingComma: , |
| 173 | + type: |
| 174 | + identifierType |
| 175 | + name: identifier "Int" |
| 176 | + firstName: _ |
| 177 | + closureParameter |
| 178 | + colon: : |
| 179 | + attributes: |
| 180 | + modifiers: |
| 181 | + type: |
| 182 | + identifierType |
| 183 | + name: identifier "String" |
| 184 | + firstName: _ |
| 185 | + statements: |
| 186 | + pattern: |
| 187 | + identifierPattern |
| 188 | + identifier: identifier "ignoreTypedClosure" |
| 189 | + |
| 190 | +--- |
| 191 | + |
| 192 | +top_level source="⟨body⟩" |
| 193 | + body: |
| 194 | + block source="⟨stmt⟩\n\n⟨stmt⟩\n\n⟨stmt⟩\n\n⟨stmt⟩" |
| 195 | + stmt: |
| 196 | + function_declaration source="func ⟨name_node⟩(⟨parameter⟩, ⟨parameter⟩) ⟨body⟩" |
| 197 | + name_node: identifier "ignore" source="ignore" |
| 198 | + parameter: |
| 199 | + parameter source="⟨external_name_node⟩⟨pattern⟩: ⟨type⟩" |
| 200 | + external_name_node: identifier "_" source="_" |
| 201 | + type: identifier "Int" source="Int" |
| 202 | + pattern: ignore_pattern "_" source="_" |
| 203 | + parameter source="⟨external_name_node⟩⟨pattern⟩: ⟨type⟩" |
| 204 | + external_name_node: identifier "_" source="_" |
| 205 | + type: identifier "String" source="String" |
| 206 | + pattern: ignore_pattern "_" source="_" |
| 207 | + body: block "{\n}" source="{\n}" |
| 208 | + function_declaration source="func ⟨name_node⟩(⟨parameter⟩, ⟨parameter⟩) ⟨body⟩" |
| 209 | + name_node: identifier "ignore" source="ignore" |
| 210 | + parameter: |
| 211 | + parameter source="⟨external_name_node⟩ ⟨pattern⟩: ⟨type⟩" |
| 212 | + external_name_node: identifier "first" source="first" |
| 213 | + type: identifier "Int" source="Int" |
| 214 | + pattern: ignore_pattern "_" source="_" |
| 215 | + parameter source="⟨external_name_node⟩ ⟨pattern⟩: ⟨type⟩" |
| 216 | + external_name_node: identifier "second" source="second" |
| 217 | + type: identifier "String" source="String" |
| 218 | + pattern: ignore_pattern "_" source="_" |
| 219 | + body: block "{\n}" source="{\n}" |
| 220 | + variable_declaration source="⟨modifier⟩ ⟨pattern⟩: ⟨type⟩ = ⟨value⟩" |
| 221 | + modifier: modifier "let" source="let" |
| 222 | + pattern: identifier "ignoreClosure" source="ignoreClosure" |
| 223 | + type: |
| 224 | + function_expr source="(⟨parameter⟩, ⟨parameter⟩) -> ⟨return_type⟩" |
| 225 | + parameter: |
| 226 | + parameter source="⟨type⟩" |
| 227 | + type: identifier "Int" source="Int" |
| 228 | + parameter source="⟨type⟩" |
| 229 | + type: identifier "String" source="String" |
| 230 | + return_type: identifier "Void" source="Void" |
| 231 | + value: |
| 232 | + function_expr source="{ ⟨parameter⟩, ⟨parameter⟩ in\n}" |
| 233 | + parameter: |
| 234 | + parameter source="⟨pattern⟩" |
| 235 | + pattern: ignore_pattern "_" source="_" |
| 236 | + parameter source="⟨pattern⟩" |
| 237 | + pattern: ignore_pattern "_" source="_" |
| 238 | + body: block source="" |
| 239 | + variable_declaration source="⟨modifier⟩ ⟨pattern⟩ = ⟨value⟩" |
| 240 | + modifier: modifier "let" source="let" |
| 241 | + pattern: identifier "ignoreTypedClosure" source="ignoreTypedClosure" |
| 242 | + value: |
| 243 | + function_expr source="{ (⟨parameter⟩, ⟨parameter⟩) in\n}" |
| 244 | + parameter: |
| 245 | + parameter source="⟨pattern⟩: ⟨type⟩" |
| 246 | + type: identifier "Int" source="Int" |
| 247 | + pattern: ignore_pattern "_" source="_" |
| 248 | + parameter source="⟨pattern⟩: ⟨type⟩" |
| 249 | + type: identifier "String" source="String" |
| 250 | + pattern: ignore_pattern "_" source="_" |
| 251 | + body: block source="" |
0 commit comments