annotate dmd/PREC.d @ 135:af1bebfd96a4 dmd2037

dmd 2.038
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Mon, 13 Sep 2010 22:19:42 +0100
parents e28b18c23469
children 94b6033c07f3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.PREC;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
114
e28b18c23469 added a module dmd.common for commonly used stuff
Trass3r
parents: 50
diff changeset
3 import dmd.common;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 import dmd.TOK;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 /**********************************
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 * Set operator precedence for each operator.
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 */
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 // Operator precedence - greater values are higher precedence
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 enum PREC
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 PREC_zero,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 PREC_expr,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 PREC_assign,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 PREC_cond,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 PREC_oror,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 PREC_andand,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 PREC_or,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 PREC_xor,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22 PREC_and,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 PREC_equal,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 PREC_rel,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 PREC_shift,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26 PREC_add,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 PREC_mul,
135
af1bebfd96a4 dmd 2.038
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 114
diff changeset
28 PREC_pow,
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 PREC_unary,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30 PREC_primary,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32
50
adf6f7f216ea CondExp.toCBuffer
korDen
parents: 0
diff changeset
33 PREC precedence[TOK.TOKMAX];
adf6f7f216ea CondExp.toCBuffer
korDen
parents: 0
diff changeset
34
adf6f7f216ea CondExp.toCBuffer
korDen
parents: 0
diff changeset
35 import dmd.EnumUtils;
adf6f7f216ea CondExp.toCBuffer
korDen
parents: 0
diff changeset
36 mixin(BringToCurrentScope!(PREC));