6 * Implements the interface to LICE's type conversion.
11 * Function: conv_capable
12 * Determines if type conversion is capable for a given type.
15 * type - The type to test for conversion capability
18 * `true` if conversion is capable, `false` otherwise.
20 bool conv_capable(data_type_t *type);
23 * Function: conv_senority
24 * Determines the senority of two types in question, returning the
25 * one which out ranks the other. This is usually used in binary
26 * operations, thus the naming of lhs and rhs are used.
29 * lhs - Left hand side type
30 * rhs - Right hand side type
33 * `lhs` if outranks `rhs`, otherwise `rhs`
35 data_type_t *conv_senority(data_type_t *lhs, data_type_t *rhs);
39 * Determines the conversion ranking of a given data type.
42 * type - The type to get the conversion ranking of.
45 * An integer value of the conversion ranking of the given data type,
46 * which can be used in the process of typicla relational, or comparitive
49 int conv_rank(data_type_t *type);
52 * Function: conv_usual
53 * Given a binary operation and the two operands, this will perform
54 * usualy type conversion and return an ast node that signifies that
55 * operation (including the conversion).
58 * operation - An ast type, or character literal for typical binary
59 * operations, like '+'.
60 * left - The left hand side of the expression.
61 * right - The right hand side of the expression.
63 ast_t *conv_usual(int operation, ast_t *left, ast_t *right);