00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef BUILTIN_EXPRESSION_H_
00014 #define BUILTIN_EXPRESSION_H_
00015
00016 #include "expression.h"
00017
00018 namespace il {
00019 class type;
00020
00021
00025 enum compass_builtin_type {_VA_ARG};
00026
00030 class builtin_expression: public il::expression {
00031
00032 friend class boost::serialization::access;
00033
00034 template<class Archive>
00035 void serialize(Archive & ar, const unsigned int version)
00036 {
00037 ar & boost::serialization::base_object<il::expression>(*this);
00038 ar & bt;
00039 ar & args;
00040 }
00041
00042 private:
00043 compass_builtin_type bt;
00044 vector<expression*> args;
00045
00046
00047 public:
00048 builtin_expression();
00049 builtin_expression(compass_builtin_type bt, vector<expression*> &args,
00050 type* t, location loc);
00051 virtual string to_string() const;
00052 virtual void print(){};
00053 virtual compass_builtin_type get_builtin_type();
00054 virtual vector<expression*> & get_arguments();
00055 virtual ~builtin_expression();
00056 static string builtin_type_to_string(compass_builtin_type b);
00057
00058 };
00059
00060 }
00061
00062 #endif