File: opinsert.cc

package info (click to toggle)
icmake 13.05.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,132 kB
  • sloc: cpp: 11,595; fortran: 883; makefile: 853; sh: 546; pascal: 342
file content (47 lines) | stat: -rw-r--r-- 855 bytes parent folder | download | duplicates (4)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "exprtype.ih"

ostream &operator<<(ostream &out, ExprType type)
{
    if (type & e_null)
        return out << "void";

out << "[ ";

    if (type & e_int)
        out << "int ";
    else if (type & e_str)
        out << "string ";
    else if (type & e_list)
        out << "list ";

    if (type & e_bool)
        out << "bool ";

    if (type & e_const)
        out << "const ";
    else if (type & e_var)
        out << "var ";
    else if (type & e_reg)
        out << "reg ";
    else if (type & e_stack)
        out << "stack ";

    if (type & e_prefix)
        out << "prefix ";
    else if (type & e_postfix)
        out << "postfix ";
    else if (type & e_order)
        out << "order ";
    else if (type & e_printf)
        out << "printf ";
    else if (type & e_fprintf)
        out << "fprintf ";

    return out << ']';
}