PolymorphicClassObjects.txt 13.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
JetFile: PolymorphicClassObjects.jet
  NAMESPACE
    CLASS
      MODIFIER_LIST
        PsiElement(virtual)('virtual')
      PsiWhiteSpace(' ')
      PsiElement(class)('class')
      PsiWhiteSpace(' ')
      PsiElement(IDENTIFIER)('Builder')
      TYPE_PARAMETER_LIST
        PsiElement(LT)('<')
        TYPE_PARAMETER
          PsiElement(IDENTIFIER)('E')
        PsiElement(COMMA)(',')
        PsiWhiteSpace(' ')
        TYPE_PARAMETER
          PsiElement(IDENTIFIER)('R')
        PsiElement(GT)('>')
      PsiWhiteSpace(' ')
      CLASS_BODY
        PsiElement(LBRACE)('{')
        PsiWhiteSpace('\n  ')
        FUN
          MODIFIER_LIST
            ATTRIBUTE_ANNOTATION
              PsiElement(LBRACKET)('[')
              ATTRIBUTE
A
Andrey Breslav 已提交
28
                TYPE_REFERENCE
29 30 31
                  USER_TYPE
                    REFERENCE_EXPRESSION
                      PsiElement(IDENTIFIER)('operator')
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
              PsiElement(RBRACKET)(']')
          PsiWhiteSpace(' ')
          PsiElement(fun)('fun')
          PsiWhiteSpace(' ')
          PsiElement(IDENTIFIER)('plusAssign')
          TYPE_PARAMETER_LIST
            <empty list>
          VALUE_PARAMETER_LIST
            PsiElement(LPAR)('(')
            VALUE_PARAMETER
              PsiElement(IDENTIFIER)('item')
              PsiWhiteSpace(' ')
              PsiElement(COLON)(':')
              PsiWhiteSpace(' ')
              TYPE_REFERENCE
47 48 49
                USER_TYPE
                  REFERENCE_EXPRESSION
                    PsiElement(IDENTIFIER)('E')
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
            PsiElement(RPAR)(')')
        PsiWhiteSpace('\n  ')
        FUN
          PsiElement(fun)('fun')
          PsiWhiteSpace(' ')
          PsiElement(IDENTIFIER)('result')
          TYPE_PARAMETER_LIST
            <empty list>
          VALUE_PARAMETER_LIST
            PsiElement(LPAR)('(')
            PsiElement(RPAR)(')')
          PsiWhiteSpace(' ')
          PsiElement(COLON)(':')
          PsiWhiteSpace(' ')
          TYPE_REFERENCE
65 66 67
            USER_TYPE
              REFERENCE_EXPRESSION
                PsiElement(IDENTIFIER)('R')
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
        PsiWhiteSpace('\n')
        PsiElement(RBRACE)('}')
    PsiWhiteSpace('\n\n')
    CLASS
      MODIFIER_LIST
        PsiElement(virtual)('virtual')
      PsiWhiteSpace(' ')
      PsiElement(class)('class')
      PsiWhiteSpace(' ')
      PsiElement(IDENTIFIER)('Buildable')
      PsiWhiteSpace(' ')
      TYPE_PARAMETER_LIST
        <empty list>
      CLASS_BODY
        PsiElement(LBRACE)('{')
        PsiWhiteSpace('\n  ')
        FUN
          PsiElement(fun)('fun')
          PsiWhiteSpace(' ')
          PsiElement(IDENTIFIER)('newBuilder')
          TYPE_PARAMETER_LIST
            PsiElement(LT)('<')
            TYPE_PARAMETER
              PsiElement(IDENTIFIER)('E')
            PsiElement(COMMA)(',')
            PsiWhiteSpace(' ')
            TYPE_PARAMETER
              PsiElement(IDENTIFIER)('R')
            PsiElement(GT)('>')
          VALUE_PARAMETER_LIST
            PsiElement(LPAR)('(')
            PsiElement(RPAR)(')')
          PsiWhiteSpace(' ')
          PsiElement(COLON)(':')
          PsiWhiteSpace(' ')
          TYPE_REFERENCE
104 105 106 107 108
            USER_TYPE
              REFERENCE_EXPRESSION
                PsiElement(IDENTIFIER)('Builder')
              TYPE_ARGUMENT_LIST
                PsiElement(LT)('<')
109 110 111 112 113
                TYPE_PROJECTION
                  TYPE_REFERENCE
                    USER_TYPE
                      REFERENCE_EXPRESSION
                        PsiElement(IDENTIFIER)('E')
114 115
                PsiElement(COMMA)(',')
                PsiWhiteSpace(' ')
116 117 118 119 120
                TYPE_PROJECTION
                  TYPE_REFERENCE
                    USER_TYPE
                      REFERENCE_EXPRESSION
                        PsiElement(IDENTIFIER)('R')
121
                PsiElement(GT)('>')
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
        PsiWhiteSpace('\n')
        PsiElement(RBRACE)('}')
    PsiWhiteSpace('\n\n')
    CLASS
      PsiElement(class)('class')
      PsiWhiteSpace(' ')
      PsiElement(IDENTIFIER)('List')
      TYPE_PARAMETER_LIST
        PsiElement(LT)('<')
        TYPE_PARAMETER
          PsiElement(IDENTIFIER)('T')
        PsiElement(GT)('>')
      PsiWhiteSpace(' ')
      CLASS_BODY
        PsiElement(LBRACE)('{')
        PsiWhiteSpace('\n\n  ')
        CLASS_OBJECT
          PsiElement(class)('class')
          PsiWhiteSpace(' ')
A
Andrey Breslav 已提交
141 142 143 144
          OBJECT_LITERAL
            PsiElement(object)('object')
            PsiWhiteSpace(' ')
            DELEGATION_SPECIFIER_LIST
145 146
              DELEGATOR_SUPER_CLASS
                TYPE_REFERENCE
147 148 149
                  USER_TYPE
                    REFERENCE_EXPRESSION
                      PsiElement(IDENTIFIER)('Buildable')
A
Andrey Breslav 已提交
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
            PsiWhiteSpace(' ')
            CLASS_BODY
              PsiElement(LBRACE)('{')
              PsiWhiteSpace('\n    ')
              FUN
                MODIFIER_LIST
                  PsiElement(override)('override')
                PsiWhiteSpace(' ')
                PsiElement(fun)('fun')
                PsiWhiteSpace(' ')
                PsiElement(IDENTIFIER)('newBuilder')
                TYPE_PARAMETER_LIST
                  PsiElement(LT)('<')
                  TYPE_PARAMETER
                    PsiElement(IDENTIFIER)('E')
                  PsiElement(COMMA)(',')
                  PsiWhiteSpace(' ')
                  TYPE_PARAMETER
                    PsiElement(IDENTIFIER)('R')
                  PsiElement(GT)('>')
                VALUE_PARAMETER_LIST
                  PsiElement(LPAR)('(')
                  PsiElement(RPAR)(')')
                PsiWhiteSpace(' ')
                PsiElement(COLON)(':')
                PsiWhiteSpace(' ')
176
                TYPE_REFERENCE
177 178 179 180 181
                  USER_TYPE
                    REFERENCE_EXPRESSION
                      PsiElement(IDENTIFIER)('Builder')
                    TYPE_ARGUMENT_LIST
                      PsiElement(LT)('<')
182 183 184 185 186
                      TYPE_PROJECTION
                        TYPE_REFERENCE
                          USER_TYPE
                            REFERENCE_EXPRESSION
                              PsiElement(IDENTIFIER)('E')
187 188
                      PsiElement(COMMA)(',')
                      PsiWhiteSpace(' ')
189 190 191 192 193
                      TYPE_PROJECTION
                        TYPE_REFERENCE
                          USER_TYPE
                            REFERENCE_EXPRESSION
                              PsiElement(IDENTIFIER)('R')
194
                      PsiElement(GT)('>')
A
Andrey Breslav 已提交
195 196
              PsiWhiteSpace('\n\n  ')
              PsiElement(RBRACE)('}')
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
        PsiWhiteSpace('\n\n')
        PsiElement(RBRACE)('}')
    PsiWhiteSpace('\n\n')
    EXTENSION
      PsiElement(extension)('extension')
      PsiWhiteSpace(' ')
      PsiElement(IDENTIFIER)('Map')
      TYPE_PARAMETER_LIST
        PsiElement(LT)('<')
        TYPE_PARAMETER
          PsiElement(IDENTIFIER)('E')
        PsiElement(COMMA)(',')
        PsiWhiteSpace(' ')
        TYPE_PARAMETER
          PsiElement(IDENTIFIER)('T')
        PsiElement(GT)('>')
        PsiWhiteSpace('\n  ')
        PsiElement(where)('where')
        PsiWhiteSpace('\n    ')
        TYPE_CONSTRAINT_LIST
          TYPE_CONSTRAINT
            TYPE_REFERENCE
219 220 221
              USER_TYPE
                REFERENCE_EXPRESSION
                  PsiElement(IDENTIFIER)('T')
222 223 224 225
            PsiWhiteSpace(' ')
            PsiElement(COLON)(':')
            PsiWhiteSpace(' ')
            TYPE_REFERENCE
226 227 228 229 230
              USER_TYPE
                REFERENCE_EXPRESSION
                  PsiElement(IDENTIFIER)('Iterable')
                TYPE_ARGUMENT_LIST
                  PsiElement(LT)('<')
231 232 233 234 235
                  TYPE_PROJECTION
                    TYPE_REFERENCE
                      USER_TYPE
                        REFERENCE_EXPRESSION
                          PsiElement(IDENTIFIER)('E')
236
                  PsiElement(GT)('>')
237 238 239 240 241 242 243 244
          PsiElement(COMMA)(',')
          PsiWhiteSpace('\n    ')
          TYPE_CONSTRAINT
            PsiElement(class)('class')
            PsiWhiteSpace(' ')
            PsiElement(object)('object')
            PsiWhiteSpace(' ')
            TYPE_REFERENCE
245 246 247
              USER_TYPE
                REFERENCE_EXPRESSION
                  PsiElement(IDENTIFIER)('T')
248 249 250 251
            PsiWhiteSpace(' ')
            PsiElement(COLON)(':')
            PsiWhiteSpace(' ')
            TYPE_REFERENCE
252 253 254 255 256
              USER_TYPE
                REFERENCE_EXPRESSION
                  PsiElement(IDENTIFIER)('Buildable')
                TYPE_ARGUMENT_LIST
                  PsiElement(LT)('<')
257 258 259 260 261
                  TYPE_PROJECTION
                    TYPE_REFERENCE
                      USER_TYPE
                        REFERENCE_EXPRESSION
                          PsiElement(IDENTIFIER)('E')
262 263
                  PsiElement(COMMA)(',')
                  PsiWhiteSpace(' ')
264 265 266 267 268
                  TYPE_PROJECTION
                    TYPE_REFERENCE
                      USER_TYPE
                        REFERENCE_EXPRESSION
                          PsiElement(IDENTIFIER)('T')
269
                  PsiElement(GT)('>')
270 271 272 273
      PsiWhiteSpace('  ')
      PsiElement(for)('for')
      PsiWhiteSpace(' ')
      TYPE_REFERENCE
274 275 276
        USER_TYPE
          REFERENCE_EXPRESSION
            PsiElement(IDENTIFIER)('T')
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
      PsiWhiteSpace(' ')
      CLASS_BODY
        PsiElement(LBRACE)('{')
        PsiWhiteSpace('\n\n  ')
        FUN
          PsiElement(fun)('fun')
          PsiWhiteSpace(' ')
          PsiElement(IDENTIFIER)('map')
          TYPE_PARAMETER_LIST
            PsiElement(LT)('<')
            TYPE_PARAMETER
              PsiElement(IDENTIFIER)('R')
            PsiElement(GT)('>')
          VALUE_PARAMETER_LIST
            PsiElement(LPAR)('(')
            VALUE_PARAMETER
              PsiElement(IDENTIFIER)('f')
              PsiWhiteSpace(' ')
              PsiElement(COLON)(':')
              PsiWhiteSpace(' ')
              TYPE_REFERENCE
                FUNCTION_TYPE
                  PsiElement(LBRACE)('{')
                  VALUE_PARAMETER_LIST
                    PsiElement(LPAR)('(')
A
Andrey Breslav 已提交
302 303 304 305 306
                    VALUE_PARAMETER
                      TYPE_REFERENCE
                        USER_TYPE
                          REFERENCE_EXPRESSION
                            PsiElement(IDENTIFIER)('E')
307 308 309 310 311
                    PsiElement(RPAR)(')')
                  PsiWhiteSpace(' ')
                  PsiElement(COLON)(':')
                  PsiWhiteSpace(' ')
                  TYPE_REFERENCE
312 313 314
                    USER_TYPE
                      REFERENCE_EXPRESSION
                        PsiElement(IDENTIFIER)('R')
315 316 317 318 319 320
                  PsiElement(RBRACE)('}')
            PsiElement(RPAR)(')')
          PsiWhiteSpace(' ')
          PsiElement(COLON)(':')
          PsiWhiteSpace(' ')
          TYPE_REFERENCE
321 322 323 324 325
            USER_TYPE
              REFERENCE_EXPRESSION
                PsiElement(IDENTIFIER)('T')
              TYPE_ARGUMENT_LIST
                PsiElement(LT)('<')
326 327 328 329 330
                TYPE_PROJECTION
                  TYPE_REFERENCE
                    USER_TYPE
                      REFERENCE_EXPRESSION
                        PsiElement(IDENTIFIER)('R')
331
                PsiElement(GT)('>')
332 333 334 335 336 337 338 339 340 341 342 343 344 345
          PsiWhiteSpace(' ')
          PsiElement(EQ)('=')
          PsiWhiteSpace(' ')
          FUNCTION_LITERAL
            PsiElement(LBRACE)('{')
            PsiWhiteSpace('\n    ')
            BODY
              PROPERTY
                PsiElement(val)('val')
                PsiWhiteSpace(' ')
                PsiElement(IDENTIFIER)('builder')
                PsiWhiteSpace(' ')
                PsiElement(EQ)('=')
                PsiWhiteSpace(' ')
A
Andrey Breslav 已提交
346
                DOT_QUALIFIED_EXPRESSION
347 348 349 350
                  REFERENCE_EXPRESSION
                    PsiElement(IDENTIFIER)('T')
                  PsiElement(DOT)('.')
                  CALL_EXPRESSION
351 352
                    REFERENCE_EXPRESSION
                      PsiElement(IDENTIFIER)('newBuilder')
353 354 355
                    VALUE_ARGUMENT_LIST
                      PsiElement(LPAR)('(')
                      PsiElement(RPAR)(')')
356 357 358 359 360 361 362 363 364 365 366
              PsiWhiteSpace('\n    ')
              FOR
                PsiElement(for)('for')
                PsiWhiteSpace(' ')
                PsiElement(LPAR)('(')
                LOOP_PARAMETER
                  PsiElement(IDENTIFIER)('e')
                PsiWhiteSpace(' ')
                PsiElement(in)('in')
                PsiWhiteSpace(' ')
                LOOP_RANGE
367 368
                  THIS_EXPRESSION
                    PsiElement(this)('this')
369 370 371 372 373 374 375 376
                PsiElement(RPAR)(')')
                PsiWhiteSpace(' ')
                BODY
                  FUNCTION_LITERAL
                    PsiElement(LBRACE)('{')
                    PsiWhiteSpace('\n      ')
                    BODY
                      BINARY_EXPRESSION
377 378
                        REFERENCE_EXPRESSION
                          PsiElement(IDENTIFIER)('builder')
379
                        PsiWhiteSpace(' ')
380 381
                        OPERATION_REFERENCE
                          PsiElement(PLUSEQ)('+=')
382 383
                        PsiWhiteSpace(' ')
                        CALL_EXPRESSION
384 385
                          REFERENCE_EXPRESSION
                            PsiElement(IDENTIFIER)('f')
386 387 388
                          VALUE_ARGUMENT_LIST
                            PsiElement(LPAR)('(')
                            VALUE_ARGUMENT
389 390
                              REFERENCE_EXPRESSION
                                PsiElement(IDENTIFIER)('e')
391 392 393 394
                            PsiElement(RPAR)(')')
                    PsiWhiteSpace('\n    ')
                    PsiElement(RBRACE)('}')
              PsiWhiteSpace('\n    ')
A
Andrey Breslav 已提交
395
              DOT_QUALIFIED_EXPRESSION
396 397 398 399
                REFERENCE_EXPRESSION
                  PsiElement(IDENTIFIER)('builder')
                PsiElement(DOT)('.')
                CALL_EXPRESSION
400 401
                  REFERENCE_EXPRESSION
                    PsiElement(IDENTIFIER)('result')
402 403 404
                  VALUE_ARGUMENT_LIST
                    PsiElement(LPAR)('(')
                    PsiElement(RPAR)(')')
405 406 407 408
            PsiWhiteSpace('\n  ')
            PsiElement(RBRACE)('}')
        PsiWhiteSpace('\n')
        PsiElement(RBRACE)('}')