Mercurial > projects > ddmd
comparison dmd/Parser.d @ 135:af1bebfd96a4 dmd2037
dmd 2.038
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Mon, 13 Sep 2010 22:19:42 +0100 |
parents | c494af1dba80 |
children | e3afd1303184 |
comparison
equal
deleted
inserted
replaced
134:4251f96733f4 | 135:af1bebfd96a4 |
---|---|
77 import dmd.ModAssignExp; | 77 import dmd.ModAssignExp; |
78 import dmd.MinAssignExp; | 78 import dmd.MinAssignExp; |
79 import dmd.DivAssignExp; | 79 import dmd.DivAssignExp; |
80 import dmd.AndAssignExp; | 80 import dmd.AndAssignExp; |
81 import dmd.AddAssignExp; | 81 import dmd.AddAssignExp; |
82 import dmd.PowAssignExp; | |
82 import dmd.ModuleDeclaration; | 83 import dmd.ModuleDeclaration; |
83 import dmd.CaseRangeStatement; | 84 import dmd.CaseRangeStatement; |
84 import dmd.CommaExp; | 85 import dmd.CommaExp; |
85 import dmd.XorExp; | 86 import dmd.XorExp; |
86 import dmd.CondExp; | 87 import dmd.CondExp; |
494 if (peek(&token).value == TOK.TOKlparen) | 495 if (peek(&token).value == TOK.TOKlparen) |
495 goto Ldeclaration; | 496 goto Ldeclaration; |
496 stc = STC.STCshared; | 497 stc = STC.STCshared; |
497 goto Lstc; | 498 goto Lstc; |
498 | 499 |
500 case TOKwild: | |
501 if (peek(&token).value == TOK.TOKlparen) | |
502 goto Ldeclaration; | |
503 stc = STCwild; | |
504 goto Lstc; | |
505 | |
499 case TOK.TOKfinal: stc = STC.STCfinal; goto Lstc; | 506 case TOK.TOKfinal: stc = STC.STCfinal; goto Lstc; |
500 case TOK.TOKauto: stc = STC.STCauto; goto Lstc; | 507 case TOK.TOKauto: stc = STC.STCauto; goto Lstc; |
501 case TOK.TOKscope: stc = STC.STCscope; goto Lstc; | 508 case TOK.TOKscope: stc = STC.STCscope; goto Lstc; |
502 case TOK.TOKoverride: stc = STC.STCoverride; goto Lstc; | 509 case TOK.TOKoverride: stc = STC.STCoverride; goto Lstc; |
503 case TOK.TOKabstract: stc = STC.STCabstract; goto Lstc; | 510 case TOK.TOKabstract: stc = STC.STCabstract; goto Lstc; |
525 { | 532 { |
526 case TOK.TOKconst: | 533 case TOK.TOKconst: |
527 case TOK.TOKinvariant: | 534 case TOK.TOKinvariant: |
528 case TOK.TOKimmutable: | 535 case TOK.TOKimmutable: |
529 case TOK.TOKshared: | 536 case TOK.TOKshared: |
537 case TOKwild: | |
530 // If followed by a (, it is not a storage class | 538 // If followed by a (, it is not a storage class |
531 if (peek(&token).value == TOK.TOKlparen) | 539 if (peek(&token).value == TOK.TOKlparen) |
532 break; | 540 break; |
533 if (token.value == TOK.TOKconst) | 541 if (token.value == TOK.TOKconst) |
534 stc = STC.STCconst; | 542 stc = STC.STCconst; |
535 else if (token.value == TOK.TOKshared) | 543 else if (token.value == TOK.TOKshared) |
536 stc = STC.STCshared; | 544 stc = STC.STCshared; |
545 else if (token.value == TOKwild) | |
546 stc = STC.STCwild; | |
537 else | 547 else |
538 stc = STC.STCimmutable; | 548 stc = STC.STCimmutable; |
539 goto Lstc; | 549 goto Lstc; |
540 case TOK.TOKfinal: stc = STC.STCfinal; goto Lstc; | 550 case TOK.TOKfinal: stc = STC.STCfinal; goto Lstc; |
541 case TOK.TOKauto: stc = STC.STCauto; goto Lstc; | 551 case TOK.TOKauto: stc = STC.STCauto; goto Lstc; |
1838 case TOK.TOKshared: | 1848 case TOK.TOKshared: |
1839 if (peek(&token).value == TOK.TOKlparen) | 1849 if (peek(&token).value == TOK.TOKlparen) |
1840 goto Ldefault; | 1850 goto Ldefault; |
1841 stc = STC.STCshared; | 1851 stc = STC.STCshared; |
1842 goto L2; | 1852 goto L2; |
1853 | |
1854 case TOKwild: | |
1855 if (peek(&token).value == TOK.TOKlparen) | |
1856 goto Ldefault; | |
1857 stc = STCwild; | |
1858 goto L2; | |
1843 | 1859 |
1844 case TOK.TOKin: stc = STC.STCin; goto L2; | 1860 case TOK.TOKin: stc = STC.STCin; goto L2; |
1845 case TOK.TOKout: stc = STC.STCout; goto L2; | 1861 case TOK.TOKout: stc = STC.STCout; goto L2; |
1862 version(D1INOUT) { | |
1846 case TOK.TOKinout: | 1863 case TOK.TOKinout: |
1864 } | |
1847 case TOK.TOKref: stc = STC.STCref; goto L2; | 1865 case TOK.TOKref: stc = STC.STCref; goto L2; |
1848 case TOK.TOKlazy: stc = STC.STClazy; goto L2; | 1866 case TOK.TOKlazy: stc = STC.STClazy; goto L2; |
1849 case TOK.TOKscope: stc = STC.STCscope; goto L2; | 1867 case TOK.TOKscope: stc = STC.STCscope; goto L2; |
1850 case TOK.TOKfinal: stc = STC.STCfinal; goto L2; | 1868 case TOK.TOKfinal: stc = STC.STCfinal; goto L2; |
1869 case TOK.TOKauto: stc = STCauto; goto L2; | |
1851 L2: | 1870 L2: |
1852 if (storageClass & stc || | 1871 if (storageClass & stc || |
1853 (storageClass & STC.STCin && stc & (STC.STCconst | STC.STCscope)) || | 1872 (storageClass & STC.STCin && stc & (STC.STCconst | STC.STCscope)) || |
1854 (stc & STC.STCin && storageClass & (STC.STCconst | STC.STCscope)) | 1873 (stc & STC.STCin && storageClass & (STC.STCconst | STC.STCscope)) |
1855 ) | 1874 ) |
2314 */ | 2333 */ |
2315 t = parseType(pident, tpl); | 2334 t = parseType(pident, tpl); |
2316 t = t.makeSharedConst(); | 2335 t = t.makeSharedConst(); |
2317 return t; | 2336 return t; |
2318 } | 2337 } |
2338 else if (token.value == TOKwild && peekNext() == TOKshared && peekNext2() != TOKlparen || | |
2339 token.value == TOKshared && peekNext() == TOKwild && peekNext2() != TOKlparen) | |
2340 { | |
2341 nextToken(); | |
2342 nextToken(); | |
2343 /* shared wild type | |
2344 */ | |
2345 t = parseType(pident, tpl); | |
2346 t = t.makeSharedWild(); | |
2347 return t; | |
2348 } | |
2319 else if (token.value == TOK.TOKconst && peekNext() != TOK.TOKlparen) | 2349 else if (token.value == TOK.TOKconst && peekNext() != TOK.TOKlparen) |
2320 { | 2350 { |
2321 nextToken(); | 2351 nextToken(); |
2322 /* const type | 2352 /* const type |
2323 */ | 2353 */ |
2342 */ | 2372 */ |
2343 t = parseType(pident, tpl); | 2373 t = parseType(pident, tpl); |
2344 t = t.makeShared(); | 2374 t = t.makeShared(); |
2345 return t; | 2375 return t; |
2346 } | 2376 } |
2377 else if (token.value == TOKwild && peekNext() != TOKlparen) | |
2378 { | |
2379 nextToken(); | |
2380 /* wild type | |
2381 */ | |
2382 t = parseType(pident, tpl); | |
2383 t = t.makeWild(); | |
2384 return t; | |
2385 } | |
2347 else | 2386 else |
2348 t = parseBasicType(); | 2387 t = parseBasicType(); |
2349 t = parseDeclarator(t, pident, tpl); | 2388 t = parseDeclarator(t, pident, tpl); |
2350 return t; | 2389 return t; |
2351 } | 2390 } |
2469 check(TOK.TOKlparen); | 2508 check(TOK.TOKlparen); |
2470 t = parseType(); | 2509 t = parseType(); |
2471 check(TOK.TOKrparen); | 2510 check(TOK.TOKrparen); |
2472 if (t.isConst()) | 2511 if (t.isConst()) |
2473 t = t.makeSharedConst(); | 2512 t = t.makeSharedConst(); |
2513 else if (t.isWild()) | |
2514 t = t.makeSharedWild(); | |
2474 else | 2515 else |
2475 t = t.makeShared(); | 2516 t = t.makeShared(); |
2476 break; | 2517 break; |
2477 | 2518 |
2519 case TOKwild: | |
2520 // wild(type) | |
2521 nextToken(); | |
2522 check(TOK.TOKlparen); | |
2523 t = parseType(); | |
2524 check(TOK.TOKrparen); | |
2525 if (t.isShared()) | |
2526 t = t.makeSharedWild(); | |
2527 else | |
2528 t = t.makeWild(); | |
2529 break; | |
2530 | |
2478 default: | 2531 default: |
2479 error("basic type expected, not %s", token.toChars()); | 2532 error("basic type expected, not %s", token.toChars()); |
2480 t = Type.tint32; | 2533 t = Type.tint32; |
2481 break; | 2534 break; |
2482 } | 2535 } |
2740 else | 2793 else |
2741 tf = tf.makeShared(); | 2794 tf = tf.makeShared(); |
2742 nextToken(); | 2795 nextToken(); |
2743 continue; | 2796 continue; |
2744 | 2797 |
2798 case TOKwild: | |
2799 if (tf.isShared()) | |
2800 tf = tf.makeSharedWild(); | |
2801 else | |
2802 tf = tf.makeWild(); | |
2803 nextToken(); | |
2804 continue; | |
2805 | |
2745 case TOK.TOKnothrow: | 2806 case TOK.TOKnothrow: |
2746 (cast(TypeFunction)tf).isnothrow = 1; | 2807 (cast(TypeFunction)tf).isnothrow = 1; |
2747 nextToken(); | 2808 nextToken(); |
2748 continue; | 2809 continue; |
2749 | 2810 |
2872 | 2933 |
2873 case TOK.TOKshared: | 2934 case TOK.TOKshared: |
2874 if (peek(&token).value == TOK.TOKlparen) | 2935 if (peek(&token).value == TOK.TOKlparen) |
2875 break; | 2936 break; |
2876 stc = STC.STCshared; | 2937 stc = STC.STCshared; |
2938 goto L1; | |
2939 | |
2940 case TOKwild: | |
2941 if (peek(&token).value == TOK.TOKlparen) | |
2942 break; | |
2943 stc = STC.STCwild; | |
2877 goto L1; | 2944 goto L1; |
2878 | 2945 |
2879 case TOK.TOKstatic: stc = STC.STCstatic; goto L1; | 2946 case TOK.TOKstatic: stc = STC.STCstatic; goto L1; |
2880 case TOK.TOKfinal: stc = STC.STCfinal; goto L1; | 2947 case TOK.TOKfinal: stc = STC.STCfinal; goto L1; |
2881 case TOK.TOKauto: stc = STC.STCauto; goto L1; | 2948 case TOK.TOKauto: stc = STC.STCauto; goto L1; |
3332 case TOK.TOKextern: | 3399 case TOK.TOKextern: |
3333 case TOK.TOKinvariant: | 3400 case TOK.TOKinvariant: |
3334 version (DMDV2) { | 3401 version (DMDV2) { |
3335 case TOK.TOKimmutable: | 3402 case TOK.TOKimmutable: |
3336 case TOK.TOKshared: | 3403 case TOK.TOKshared: |
3404 case TOKwild: | |
3337 case TOK.TOKnothrow: | 3405 case TOK.TOKnothrow: |
3338 case TOK.TOKpure: | 3406 case TOK.TOKpure: |
3339 case TOK.TOKtls: | 3407 case TOK.TOKtls: |
3340 case TOK.TOKgshared: | 3408 case TOK.TOKgshared: |
3341 case TOK.TOKat: | 3409 case TOK.TOKat: |
3524 { | 3592 { |
3525 Identifier ai = null; | 3593 Identifier ai = null; |
3526 Type at; | 3594 Type at; |
3527 StorageClass storageClass = STC.STCundefined; | 3595 StorageClass storageClass = STC.STCundefined; |
3528 | 3596 |
3529 if (token.value == TOK.TOKinout || token.value == TOK.TOKref) | 3597 if (token.value == TOKref |
3598 //#if D1INOUT | |
3599 // || token.value == TOKinout | |
3600 //#endif | |
3601 ) | |
3530 { storageClass = STC.STCref; | 3602 { storageClass = STC.STCref; |
3531 nextToken(); | 3603 nextToken(); |
3532 } | 3604 } |
3533 if (token.value == TOK.TOKidentifier) | 3605 if (token.value == TOK.TOKidentifier) |
3534 { | 3606 { |
4372 | 4444 |
4373 version (DMDV2) { | 4445 version (DMDV2) { |
4374 if ((t.value == TOK.TOKconst || | 4446 if ((t.value == TOK.TOKconst || |
4375 t.value == TOK.TOKinvariant || | 4447 t.value == TOK.TOKinvariant || |
4376 t.value == TOK.TOKimmutable || | 4448 t.value == TOK.TOKimmutable || |
4449 t.value == TOKwild || | |
4377 t.value == TOK.TOKshared) && | 4450 t.value == TOK.TOKshared) && |
4378 peek(t).value != TOK.TOKlparen) | 4451 peek(t).value != TOK.TOKlparen) |
4379 { | 4452 { |
4380 /* const type | 4453 /* const type |
4381 * immutable type | 4454 * immutable type |
4382 * shared type | 4455 * shared type |
4456 * wild type | |
4383 */ | 4457 */ |
4384 t = peek(t); | 4458 t = peek(t); |
4385 } | 4459 } |
4386 } | 4460 } |
4387 | 4461 |
4536 | 4610 |
4537 case TOK.TOKconst: | 4611 case TOK.TOKconst: |
4538 case TOK.TOKinvariant: | 4612 case TOK.TOKinvariant: |
4539 case TOK.TOKimmutable: | 4613 case TOK.TOKimmutable: |
4540 case TOK.TOKshared: | 4614 case TOK.TOKshared: |
4541 // const(type) or immutable(type) or shared(type) | 4615 case TOKwild: |
4616 // const(type) or immutable(type) or shared(type) or wild(type) | |
4542 t = peek(t); | 4617 t = peek(t); |
4543 if (t.value != TOK.TOKlparen) | 4618 if (t.value != TOK.TOKlparen) |
4544 goto Lfalse; | 4619 goto Lfalse; |
4545 t = peek(t); | 4620 t = peek(t); |
4546 if (!isDeclaration(t, 0, TOK.TOKrparen, &t)) | 4621 if (!isDeclaration(t, 0, TOK.TOKrparen, &t)) |
4701 { | 4776 { |
4702 case TOK.TOKconst: | 4777 case TOK.TOKconst: |
4703 case TOK.TOKinvariant: | 4778 case TOK.TOKinvariant: |
4704 case TOK.TOKimmutable: | 4779 case TOK.TOKimmutable: |
4705 case TOK.TOKshared: | 4780 case TOK.TOKshared: |
4781 case TOKwild: | |
4706 case TOK.TOKpure: | 4782 case TOK.TOKpure: |
4707 case TOK.TOKnothrow: | 4783 case TOK.TOKnothrow: |
4708 t = peek(t); | 4784 t = peek(t); |
4709 continue; | 4785 continue; |
4710 case TOK.TOKat: | 4786 case TOK.TOKat: |
4761 | 4837 |
4762 case TOKdotdotdot: | 4838 case TOKdotdotdot: |
4763 t = peek(t); | 4839 t = peek(t); |
4764 break; | 4840 break; |
4765 | 4841 |
4842 version(D1INOUT) { | |
4843 case TOKinout: | |
4844 } | |
4766 case TOKin: | 4845 case TOKin: |
4767 case TOKout: | 4846 case TOKout: |
4768 case TOKinout: | |
4769 case TOKref: | 4847 case TOKref: |
4770 case TOKlazy: | 4848 case TOKlazy: |
4771 case TOKfinal: | 4849 case TOKfinal: |
4850 case TOKauto: | |
4772 continue; | 4851 continue; |
4773 | 4852 |
4774 case TOKconst: | 4853 case TOKconst: |
4775 case TOKinvariant: | 4854 case TOKinvariant: |
4776 case TOKimmutable: | 4855 case TOKimmutable: |
4777 case TOKshared: | 4856 case TOKshared: |
4857 case TOKwild: | |
4778 t = peek(t); | 4858 t = peek(t); |
4779 if (t.value == TOKlparen) | 4859 if (t.value == TOKlparen) |
4780 { | 4860 { |
4781 t = peek(t); | 4861 t = peek(t); |
4782 if (!isDeclaration(t, 0, TOKrparen, &t)) | 4862 if (!isDeclaration(t, 0, TOKrparen, &t)) |
5285 ///version (DMDV2) { | 5365 ///version (DMDV2) { |
5286 token.value == TOK.TOKconst && peek(&token).value == TOK.TOKrparen || | 5366 token.value == TOK.TOKconst && peek(&token).value == TOK.TOKrparen || |
5287 token.value == TOK.TOKinvariant && peek(&token).value == TOK.TOKrparen || | 5367 token.value == TOK.TOKinvariant && peek(&token).value == TOK.TOKrparen || |
5288 token.value == TOK.TOKimmutable && peek(&token).value == TOK.TOKrparen || | 5368 token.value == TOK.TOKimmutable && peek(&token).value == TOK.TOKrparen || |
5289 token.value == TOK.TOKshared && peek(&token).value == TOK.TOKrparen || | 5369 token.value == TOK.TOKshared && peek(&token).value == TOK.TOKrparen || |
5370 token.value == TOKwild && peek(&token).value == TOKrparen || | |
5290 ///} | 5371 ///} |
5291 token.value == TOK.TOKfunction || | 5372 token.value == TOK.TOKfunction || |
5292 token.value == TOK.TOKdelegate || | 5373 token.value == TOK.TOKdelegate || |
5293 token.value == TOK.TOKreturn)) | 5374 token.value == TOK.TOKreturn)) |
5294 { | 5375 { |
5579 case TOK.TOKcast: // cast(type) expression | 5660 case TOK.TOKcast: // cast(type) expression |
5580 { | 5661 { |
5581 nextToken(); | 5662 nextToken(); |
5582 check(TOK.TOKlparen); | 5663 check(TOK.TOKlparen); |
5583 /* Look for cast(), cast(const), cast(immutable), | 5664 /* Look for cast(), cast(const), cast(immutable), |
5584 * cast(shared), cast(shared const) | 5665 * cast(shared), cast(shared const), cast(wild), cast(shared wild) |
5585 */ | 5666 */ |
5586 MOD m; | 5667 MOD m; |
5587 if (token.value == TOK.TOKrparen) | 5668 if (token.value == TOK.TOKrparen) |
5588 { | 5669 { |
5589 m = MOD.MODundefined; | 5670 m = MOD.MODundefined; |
5594 m = MOD.MODconst; | 5675 m = MOD.MODconst; |
5595 goto Lmod2; | 5676 goto Lmod2; |
5596 } | 5677 } |
5597 else if ((token.value == TOK.TOKimmutable || token.value == TOK.TOKinvariant) && peekNext() == TOK.TOKrparen) | 5678 else if ((token.value == TOK.TOKimmutable || token.value == TOK.TOKinvariant) && peekNext() == TOK.TOKrparen) |
5598 { | 5679 { |
5599 m = MOD.MODinvariant; | 5680 m = MOD.MODimmutable; |
5600 goto Lmod2; | 5681 goto Lmod2; |
5601 } | 5682 } |
5602 else if (token.value == TOK.TOKshared && peekNext() == TOK.TOKrparen) | 5683 else if (token.value == TOK.TOKshared && peekNext() == TOK.TOKrparen) |
5603 { | 5684 { |
5604 m = MOD.MODshared; | 5685 m = MOD.MODshared; |
5605 goto Lmod2; | 5686 goto Lmod2; |
5606 } | 5687 } |
5688 else if (token.value == TOKwild && peekNext() == TOK.TOKrparen) | |
5689 { | |
5690 m = MODwild; | |
5691 goto Lmod2; | |
5692 } | |
5693 else if (token.value == TOKwild && peekNext() == TOK.TOKshared && peekNext2() == TOK.TOKrparen || | |
5694 token.value == TOK.TOKshared && peekNext() == TOKwild && peekNext2() == TOK.TOKrparen) | |
5695 { | |
5696 m = MOD.MODshared | MOD.MODwild; | |
5697 goto Lmod3; | |
5698 } | |
5607 else if (token.value == TOK.TOKconst && peekNext() == TOK.TOKshared && peekNext2() == TOK.TOKrparen || | 5699 else if (token.value == TOK.TOKconst && peekNext() == TOK.TOKshared && peekNext2() == TOK.TOKrparen || |
5608 token.value == TOK.TOKshared && peekNext() == TOK.TOKconst && peekNext2() == TOK.TOKrparen) | 5700 token.value == TOK.TOKshared && peekNext() == TOK.TOKconst && peekNext2() == TOK.TOKrparen) |
5609 { | 5701 { |
5610 m = MOD.MODshared | MOD.MODconst; | 5702 m = MOD.MODshared | MOD.MODconst; |
5703 Lmod3: | |
5611 nextToken(); | 5704 nextToken(); |
5612 Lmod2: | 5705 Lmod2: |
5613 nextToken(); | 5706 nextToken(); |
5614 Lmod1: | 5707 Lmod1: |
5615 nextToken(); | 5708 nextToken(); |
5732 e = parsePrimaryExp(); | 5825 e = parsePrimaryExp(); |
5733 e = parsePostExp(e); | 5826 e = parsePostExp(e); |
5734 break; | 5827 break; |
5735 } | 5828 } |
5736 assert(e); | 5829 assert(e); |
5830 | |
5831 // ^^ is right associative and has higher precedence than the unary operators | |
5832 while (token.value == TOK.TOKpow) | |
5833 { | |
5834 nextToken(); | |
5835 Expression e2 = parseUnaryExp(); | |
5836 e = new PowExp(loc, e, e2); | |
5837 } | |
5838 | |
5737 return e; | 5839 return e; |
5738 } | 5840 } |
5739 | 5841 |
5740 Expression parsePostExp(Expression e) | 5842 Expression parsePostExp(Expression e) |
5741 { | 5843 { |
5860 switch (token.value) | 5962 switch (token.value) |
5861 { | 5963 { |
5862 case TOK.TOKmul: nextToken(); e2 = parseUnaryExp(); e = new MulExp(loc,e,e2); continue; | 5964 case TOK.TOKmul: nextToken(); e2 = parseUnaryExp(); e = new MulExp(loc,e,e2); continue; |
5863 case TOK.TOKdiv: nextToken(); e2 = parseUnaryExp(); e = new DivExp(loc,e,e2); continue; | 5965 case TOK.TOKdiv: nextToken(); e2 = parseUnaryExp(); e = new DivExp(loc,e,e2); continue; |
5864 case TOK.TOKmod: nextToken(); e2 = parseUnaryExp(); e = new ModExp(loc,e,e2); continue; | 5966 case TOK.TOKmod: nextToken(); e2 = parseUnaryExp(); e = new ModExp(loc,e,e2); continue; |
5865 case TOK.TOKpow: nextToken(); e2 = parseUnaryExp(); e = new PowExp(loc,e,e2); continue; | |
5866 | 5967 |
5867 default: | 5968 default: |
5868 break; | 5969 break; |
5869 } | 5970 } |
5870 break; | 5971 break; |
6127 case TOK.TOKaddass: nextToken(); e2 = parseAssignExp(); e = new AddAssignExp(loc,e,e2); continue; | 6228 case TOK.TOKaddass: nextToken(); e2 = parseAssignExp(); e = new AddAssignExp(loc,e,e2); continue; |
6128 case TOK.TOKminass: nextToken(); e2 = parseAssignExp(); e = new MinAssignExp(loc,e,e2); continue; | 6229 case TOK.TOKminass: nextToken(); e2 = parseAssignExp(); e = new MinAssignExp(loc,e,e2); continue; |
6129 case TOK.TOKmulass: nextToken(); e2 = parseAssignExp(); e = new MulAssignExp(loc,e,e2); continue; | 6230 case TOK.TOKmulass: nextToken(); e2 = parseAssignExp(); e = new MulAssignExp(loc,e,e2); continue; |
6130 case TOK.TOKdivass: nextToken(); e2 = parseAssignExp(); e = new DivAssignExp(loc,e,e2); continue; | 6231 case TOK.TOKdivass: nextToken(); e2 = parseAssignExp(); e = new DivAssignExp(loc,e,e2); continue; |
6131 case TOK.TOKmodass: nextToken(); e2 = parseAssignExp(); e = new ModAssignExp(loc,e,e2); continue; | 6232 case TOK.TOKmodass: nextToken(); e2 = parseAssignExp(); e = new ModAssignExp(loc,e,e2); continue; |
6132 // case TOK.TOKpowass: nextToken(); e2 = parseAssignExp(); e = new PowAssignExp(loc,e,e2); continue; | 6233 case TOK.TOKpowass: nextToken(); e2 = parseAssignExp(); e = new PowAssignExp(loc,e,e2); continue; |
6133 case TOK.TOKandass: nextToken(); e2 = parseAssignExp(); e = new AndAssignExp(loc,e,e2); continue; | 6234 case TOK.TOKandass: nextToken(); e2 = parseAssignExp(); e = new AndAssignExp(loc,e,e2); continue; |
6134 case TOK.TOKorass: nextToken(); e2 = parseAssignExp(); e = new OrAssignExp(loc,e,e2); continue; | 6235 case TOK.TOKorass: nextToken(); e2 = parseAssignExp(); e = new OrAssignExp(loc,e,e2); continue; |
6135 case TOK.TOKxorass: nextToken(); e2 = parseAssignExp(); e = new XorAssignExp(loc,e,e2); continue; | 6236 case TOK.TOKxorass: nextToken(); e2 = parseAssignExp(); e = new XorAssignExp(loc,e,e2); continue; |
6136 case TOK.TOKshlass: nextToken(); e2 = parseAssignExp(); e = new ShlAssignExp(loc,e,e2); continue; | 6237 case TOK.TOKshlass: nextToken(); e2 = parseAssignExp(); e = new ShlAssignExp(loc,e,e2); continue; |
6137 case TOK.TOKshrass: nextToken(); e2 = parseAssignExp(); e = new ShrAssignExp(loc,e,e2); continue; | 6238 case TOK.TOKshrass: nextToken(); e2 = parseAssignExp(); e = new ShrAssignExp(loc,e,e2); continue; |