annotate dmd/PREC.d @ 0:10317f0c89a5

Initial commit
author korDen
date Sat, 24 Oct 2009 08:42:06 +0400
parents
children adf6f7f216ea
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
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
3 import dmd.TOK;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 /**********************************
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 * Set operator precedence for each operator.
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 */
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 // Operator precedence - greater values are higher precedence
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 enum PREC
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 PREC_zero,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 PREC_expr,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 PREC_assign,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 PREC_cond,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 PREC_oror,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 PREC_andand,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 PREC_or,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 PREC_xor,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 PREC_and,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22 PREC_equal,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 PREC_rel,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 PREC_shift,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 PREC_add,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26 PREC_mul,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 PREC_unary,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 PREC_primary,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 PREC precedence[TOK.TOKMAX];