annotate dmd/PREC.d @ 114:e28b18c23469

added a module dmd.common for commonly used stuff it currently holds code for consistency checking of predefined versions also added a VisualD project file
author Trass3r
date Wed, 01 Sep 2010 18:21:58 +0200
parents adf6f7f216ea
children af1bebfd96a4
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,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 PREC_unary,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 PREC_primary,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31
50
adf6f7f216ea CondExp.toCBuffer
korDen
parents: 0
diff changeset
32 PREC precedence[TOK.TOKMAX];
adf6f7f216ea CondExp.toCBuffer
korDen
parents: 0
diff changeset
33
adf6f7f216ea CondExp.toCBuffer
korDen
parents: 0
diff changeset
34 import dmd.EnumUtils;
adf6f7f216ea CondExp.toCBuffer
korDen
parents: 0
diff changeset
35 mixin(BringToCurrentScope!(PREC));