do_import(Import_expression*, Location);
protected:
+ int
+ do_traverse(Traverse*);
+
bool
do_is_constant() const
{ return true; }
Type* type_;
};
+// Traverse a boolean expression. We just need to traverse the type
+// if there is one.
+
+int
+Boolean_expression::do_traverse(Traverse* traverse)
+{
+ if (this->type_ != NULL)
+ return Type::traverse(this->type_, traverse);
+ return TRAVERSE_CONTINUE;
+}
+
// Get the type.
Type*
// Class String_expression.
+// Traverse a string expression. We just need to traverse the type
+// if there is one.
+
+int
+String_expression::do_traverse(Traverse* traverse)
+{
+ if (this->type_ != NULL)
+ return Type::traverse(this->type_, traverse);
+ return TRAVERSE_CONTINUE;
+}
+
// Get the type.
Type*
dump_integer(Ast_dump_context* ast_dump_context, const mpz_t val);
protected:
+ int
+ do_traverse(Traverse*);
+
bool
do_is_constant() const
{ return true; }
bool is_character_constant_;
};
+// Traverse an integer expression. We just need to traverse the type
+// if there is one.
+
+int
+Integer_expression::do_traverse(Traverse* traverse)
+{
+ if (this->type_ != NULL)
+ return Type::traverse(this->type_, traverse);
+ return TRAVERSE_CONTINUE;
+}
+
// Return a numeric constant for this expression. We have to mark
// this as a character when appropriate.
dump_float(Ast_dump_context* ast_dump_context, const mpfr_t val);
protected:
+ int
+ do_traverse(Traverse*);
+
bool
do_is_constant() const
{ return true; }
Type* type_;
};
+// Traverse a float expression. We just need to traverse the type if
+// there is one.
+
+int
+Float_expression::do_traverse(Traverse* traverse)
+{
+ if (this->type_ != NULL)
+ return Type::traverse(this->type_, traverse);
+ return TRAVERSE_CONTINUE;
+}
+
// Return the current type. If we haven't set the type yet, we return
// an abstract float type.
dump_complex(Ast_dump_context* ast_dump_context, const mpc_t val);
protected:
+ int
+ do_traverse(Traverse*);
+
bool
do_is_constant() const
{ return true; }
Type* type_;
};
+// Traverse a complex expression. We just need to traverse the type
+// if there is one.
+
+int
+Complex_expression::do_traverse(Traverse* traverse)
+{
+ if (this->type_ != NULL)
+ return Type::traverse(this->type_, traverse);
+ return TRAVERSE_CONTINUE;
+}
+
// Return the current type. If we haven't set the type yet, we return
// an abstract complex type.