lscript_typecheck.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LSCRIPT_TYPECHECK_H
00033 #define LL_LSCRIPT_TYPECHECK_H
00034 
00035 #include "lscript_error.h"
00036 
00037 LSCRIPTType implicit_casts(LSCRIPTType left_side, LSCRIPTType right_side);
00038 BOOL legal_casts(LSCRIPTType cast, LSCRIPTType base);
00039 LSCRIPTType promote(LSCRIPTType left_side, LSCRIPTType right_side);
00040 BOOL legal_assignment(LSCRIPTType left_side, LSCRIPTType right_side);
00041 
00042 typedef enum e_lscript_expression_types
00043 {
00044         LET_NULL,
00045         LET_ASSIGNMENT,
00046         LET_ADD_ASSIGN,
00047         LET_SUB_ASSIGN,
00048         LET_MUL_ASSIGN,
00049         LET_DIV_ASSIGN,
00050         LET_MOD_ASSIGN,
00051         LET_EQUALITY,
00052         LET_NOT_EQUALS,
00053         LET_LESS_EQUALS,
00054         LET_GREATER_EQUALS,
00055         LET_LESS_THAN,
00056         LET_GREATER_THAN,
00057         LET_PLUS,
00058         LET_MINUS,
00059         LET_TIMES,
00060         LET_DIVIDE,
00061         LET_MOD,
00062         LET_BIT_AND,
00063         LET_BIT_OR,
00064         LET_BIT_XOR,
00065         LET_BOOLEAN_AND,
00066         LET_BOOLEAN_OR,
00067         LET_PARENTHESIS,
00068         LET_UNARY_MINUS,
00069         LET_BOOLEAN_NOT,
00070         LET_BIT_NOT,
00071         LET_PRE_INCREMENT,
00072         LET_PRE_DECREMENT,
00073         LET_CAST,
00074         LET_VECTOR_INITIALIZER,
00075         LET_QUATERNION_INITIALIZER,
00076         LET_LIST_INITIALIZER,
00077         LET_LVALUE,
00078         LET_POST_INCREMENT,
00079         LET_POST_DECREMENT,
00080         LET_FUNCTION_CALL,
00081         LET_CONSTANT,
00082         LET_FOR_EXPRESSION_LIST,
00083         LET_FUNC_EXPRESSION_LIST,
00084         LET_LIST_EXPRESSION_LIST,
00085         LET_PRINT,
00086         LET_SHIFT_LEFT,
00087         LET_SHIFT_RIGHT,
00088         LET_EOF
00089 } LSCRIPTExpressionType;
00090 
00091 BOOL legal_binary_expression(LSCRIPTType &result, LSCRIPTType left_side, LSCRIPTType right_side, LSCRIPTExpressionType expression);
00092 BOOL legal_unary_expression(LSCRIPTType &result, LSCRIPTType left_side, LSCRIPTExpressionType expression);
00093 
00094 void init_supported_expressions(void);
00095 
00096 /*
00097   LScript automatic type casting
00098 
00099   LST_INTEGER                   -> LST_INTEGER
00100 
00101   LST_FLOATINGPOINT             -> LST_FLOATINGPOINT
00102   LST_INTEGER                   -> LST_FLOATINGPOINT
00103 
00104   LST_FLOATINGPOINT             -> LST_STRING
00105   LST_INTEGER                   -> LST_STRING
00106   LST_STRING                    -> LST_STRING
00107   LST_VECTOR                    -> LST_STRING
00108   LST_QUATERNION                -> LST_STRING
00109   LST_LIST                              -> LST_STRING
00110 
00111   LST_VECTOR                    -> LST_VECTOR
00112   
00113   LST_QUATERNION                -> LST_QUATERNION
00114   
00115   LST_FLOATINGPOINT             -> LST_LIST
00116   LST_INTEGER                   -> LST_LIST
00117   LST_STRING                    -> LST_LIST
00118   LST_VECTOR                    -> LST_LIST
00119   LST_QUATERNION                -> LST_LIST
00120   LST_LIST                              -> LST_LIST
00121 */
00122 
00123 #endif

Generated on Thu Jul 1 06:09:54 2010 for Second Life Viewer by  doxygen 1.4.7