Set line info on class properties
This will allow to generate error messages that point to the right line if there is something wrong or not supported in a class property declaration. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
dda960dce4
commit
bcae0304a3
|
|
@ -86,6 +86,7 @@ void pform_class_property(const struct vlltype&loc,
|
|||
|
||||
pform_cur_class->type->properties[curp->name]
|
||||
= class_type_t::prop_info_t(property_qual,use_type);
|
||||
FILE_NAME(&pform_cur_class->type->properties[curp->name], loc);
|
||||
|
||||
if (PExpr*rval = curp->expr.release()) {
|
||||
PExpr*lval = new PEIdent(curp->name);
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ struct class_type_t : public data_type_t {
|
|||
std::list<PExpr*>base_args;
|
||||
|
||||
// This is a map of the properties. Map the name to the type.
|
||||
struct prop_info_t {
|
||||
struct prop_info_t : public LineInfo {
|
||||
inline prop_info_t() : qual(property_qualifier_t::make_none()), type(0) { }
|
||||
inline prop_info_t(property_qualifier_t q, data_type_t*t) : qual(q), type(t) { }
|
||||
property_qualifier_t qual;
|
||||
|
|
|
|||
Loading…
Reference in New Issue