Identifier &operator= (Identifier &&) = default;
NodeId get_node_id () const { return node_id; }
- Location get_locus () const { return loc; }
+ location_t get_locus () const { return loc; }
const std::string &as_string () const { return ident; }
bool empty () const { return ident.empty (); }
TokenId get_id () const { return tok_ref->get_id (); }
const std::string &get_str () const { return tok_ref->get_str (); }
- Location get_locus () const { return tok_ref->get_locus (); }
+ location_t get_locus () const { return tok_ref->get_locus (); }
PrimitiveCoreType get_type_hint () const { return tok_ref->get_type_hint (); }
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
NodeId get_node_id () const { return node_id; }
const std::string &get_segment_name () const { return segment_name; }
bool is_super_path_seg () const
return opening_scope_resolution;
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
NodeId get_node_id () const { return node_id; }
// does this need visitor if not polymorphic? probably not
// Returns whether the attribute is considered an "empty" attribute.
bool is_empty () const { return attr_input == nullptr && path.is_empty (); }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
AttrInput &get_attr_input () const { return *attr_input; }
virtual ~MetaItemInner ();
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual std::string as_string () const = 0;
virtual std::string as_string () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual void mark_for_strip () = 0;
virtual bool is_marked_for_strip () const = 0;
virtual ~Expr () {}
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual bool is_literal () const { return false; }
std::string as_string () const override { return ident.as_string (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
Identifier get_ident () const { return ident; }
virtual void mark_for_strip () {}
virtual bool is_marked_for_strip () const { return false; }
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual NodeId get_pattern_node_id () const = 0;
protected:
virtual void mark_for_strip () {}
virtual bool is_marked_for_strip () const { return false; }
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
NodeId get_node_id () const { return node_id; }
NodeId get_node_id () const { return node_id; }
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
protected:
// Clone function implementation as pure virtual method
LifetimeType get_lifetime_type () { return lifetime_type; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
std::string get_lifetime_name () const { return lifetime_name; }
virtual std::string as_string () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual Kind get_kind () const = 0;
void accept_vis (ASTVisitor &vis) override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
Kind get_kind () const override final { return Kind::Lifetime; }
virtual bool is_marked_for_strip () const = 0;
NodeId get_node_id () const { return node_id; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
/* Abstract base class for items used within an inherent impl block (the impl
virtual void mark_for_strip () = 0;
virtual bool is_marked_for_strip () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
};
// Abstract base class for items used in a trait impl
return std::unique_ptr<LiteralExpr> (clone_literal_expr_impl ());
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
bool is_literal () const override final { return true; }
std::string as_string () const override { return lit_expr.as_string (); }
- Location get_locus () const override { return lit_expr.get_locus (); }
+ location_t get_locus () const override { return lit_expr.get_locus (); }
LiteralExpr get_literal () const { return lit_expr; }
// we have no idea use which of them, just simply return UNKNOWN_LOCATION
// now.
// Maybe we will figure out when we really need the location in the future.
- Location get_locus () const override { return UNKNOWN_LOCATION; }
+ location_t get_locus () const override { return UNKNOWN_LOCATION; }
void accept_vis (ASTVisitor &vis) override;
OperatorExpr &operator= (OperatorExpr &&other) = default;
public:
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
// Invalid if expr is null, so base stripping on that.
void mark_for_strip () override { main_or_left_expr = nullptr; }
GroupedExpr (GroupedExpr &&other) = default;
GroupedExpr &operator= (GroupedExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
ArrayExpr (ArrayExpr &&other) = default;
ArrayExpr &operator= (ArrayExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
ArrayIndexExpr (ArrayIndexExpr &&other) = default;
ArrayIndexExpr &operator= (ArrayIndexExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
/* Note: syntactically, can disambiguate single-element tuple from parens with
* comma, i.e. (0,) rather than (0) */
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
TupleIndexExpr (TupleIndexExpr &&other) = default;
TupleIndexExpr &operator= (TupleIndexExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
inner_attrs (std::move (inner_attribs)), locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
virtual void accept_vis (ASTVisitor &vis) = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
NodeId get_node_id () const { return node_id; }
std::string as_string () const override { return field_name.as_string (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string get_field_name () const { return field_name.as_string (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
protected:
/* Use covariance to implement clone function as returning this object rather
TupleIndex get_index () const { return index; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
protected:
/* Use covariance to implement clone function as returning this object rather
// Returns whether function call has parameters.
bool has_params () const { return !params.empty (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
MethodCallExpr (MethodCallExpr &&other) = default;
MethodCallExpr &operator= (MethodCallExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
FieldAccessExpr (FieldAccessExpr &&other) = default;
FieldAccessExpr &operator= (FieldAccessExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
return type;
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
// Base closure definition expression AST node - abstract
public:
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
// TODO: this mutable getter seems really dodgy. Think up better way.
const std::vector<ClosureParam> &get_params () const { return params; }
return std::unique_ptr<BlockExpr> (clone_block_expr_impl ());
}
- Location get_locus () const override final { return start_locus; }
+ location_t get_locus () const override final { return start_locus; }
Location get_start_locus () const { return start_locus; }
Location get_end_locus () const { return end_locus; }
locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
BreakExpr (BreakExpr &&other) = default;
BreakExpr &operator= (BreakExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
RangeExpr (location_t locus) : locus (locus) {}
public:
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
std::vector<Attribute> &get_outer_attrs () override final
{
ReturnExpr (ReturnExpr &&other) = default;
ReturnExpr &operator= (ReturnExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
UnsafeBlockExpr (UnsafeBlockExpr &&other) = default;
UnsafeBlockExpr &operator= (UnsafeBlockExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
// Creates an error state LoopLabel.
static LoopLabel error () { return LoopLabel (Lifetime::error ()); }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Lifetime &get_lifetime () { return label; }
LoopLabel &get_loop_label () { return loop_label; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
// Invalid if loop block is null, so base stripping on that.
void mark_for_strip () override { loop_block = nullptr; }
* vector of else ifs - i.e. not like a switch statement. TODO - is this a
* better approach? or does it not parse correctly and have downsides? */
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
return std::unique_ptr<IfLetExpr> (clone_if_let_expr_impl ());
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
return match_arm_patterns;
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
/* A "match case" - a correlated match arm and resulting expression. Not
MatchExpr (MatchExpr &&other) = default;
MatchExpr &operator= (MatchExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
bool get_has_move () { return has_move; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
Kind get_kind () const override final { return Kind::Type; }
std::vector<Lifetime> &get_lifetime_bounds () { return lifetime_bounds; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
protected:
// Clone function implementation as (not pure) virtual method
NodeId get_node_id () const override final { return node_id; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
protected:
// Clone function implementation as (not pure) virtual method
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
bool get_has_ref () const { return has_ref; };
bool get_is_mut () const { return is_mut; }
std::string get_extern_abi () const { return extern_abi; }
bool has_abi () const { return !extern_abi.empty (); }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
// A function parameter
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// TODO: seems kinda dodgy. Think of better way.
std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
// Returns whether visibility is public or not.
bool is_public () const { return vis_type != PRIV && !is_error (); }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// empty?
// Creates an error visibility.
NodeId get_node_id () const { return node_id; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
FunctionQualifiers get_qualifiers () { return qualifiers; }
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
// Invalid if name is empty, so base stripping on that.
void mark_for_strip () override { module_name = {""}; }
as_clause_name (std::move (as_clause_name)), locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
virtual std::string as_string () const = 0;
virtual Kind get_kind () const = 0;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
virtual void accept_vis (ASTVisitor &vis) = 0;
UseDeclaration (UseDeclaration &&other) = default;
UseDeclaration &operator= (UseDeclaration &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
std::unique_ptr<UseTree> &get_tree () { return use_tree; }
Function (Function &&other) = default;
Function &operator= (Function &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
TypeAlias (TypeAlias &&other) = default;
TypeAlias &operator= (TypeAlias &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
// Returns whether struct has a where clause.
bool has_where_clause () const { return !where_clause.is_empty (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
// Invalid if name is empty, so base stripping on that.
void mark_for_strip () override { struct_name = {""}; }
Identifier get_field_name () const { return field_name; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// TODO: is this better? Or is a "vis_block" better?
std::unique_ptr<Type> &get_field_type ()
Visibility &get_visibility () { return visibility; }
const Visibility &get_visibility () const { return visibility; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// TODO: this mutable getter seems really dodgy. Think up better way.
std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
// not pure virtual as not abstract
virtual void accept_vis (ASTVisitor &vis) override;
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
Identifier get_identifier () const { return variant_name; }
Enum (Enum &&other) = default;
Enum &operator= (Enum &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
Union (Union &&other) = default;
Union &operator= (Union &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
* as identifier) constant. */
bool is_unnamed () const { return identifier == "_"; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
StaticItem (StaticItem &&other) = default;
StaticItem &operator= (StaticItem &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void accept_vis (ASTVisitor &vis) override;
Trait (Trait &&other) = default;
Trait &operator= (Trait &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
// Returns whether impl has inner attributes.
bool has_inner_attrs () const { return !inner_attrs.empty (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
// Invalid if trait type is null, so base stripping on that.
void mark_for_strip () override { trait_type = nullptr; }
virtual std::string as_string () const;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
virtual void accept_vis (ASTVisitor &vis) = 0;
// Returns whether item has non-default visibility.
bool has_visibility () const { return !visibility.is_error (); }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void mark_for_strip () override { marked_for_strip = true; };
bool is_marked_for_strip () const override { return marked_for_strip; };
// Returns whether item has non-default visibility.
bool has_visibility () const { return !visibility.is_error (); }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// Based on idea that type should never be null.
void mark_for_strip () override { item_type = nullptr; };
std::string get_name () const { return name; }
- Location get_locus () { return locus; }
+ location_t get_locus () { return locus; }
// Creates an error state named function parameter.
static NamedFunctionParam create_error ()
return !variadic_outer_attrs.empty ();
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Visibility &get_visibility () { return visibility; }
const Visibility &get_visibility () const { return visibility; }
ExternBlock (ExternBlock &&other) = default;
ExternBlock &operator= (ExternBlock &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const { return token_tree.as_string (); }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
DelimTokenTree &get_token_tree () { return token_tree; }
const DelimTokenTree &get_token_tree () const { return token_tree; }
locus);
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
std::string as_string () const;
std::vector<MacroRule> &get_macro_rules () { return rules; }
const std::vector<MacroRule> &get_macro_rules () const { return rules; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
Identifier get_rule_name () const { return rule_name; }
std::move (pending_eager_invocations)));
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
return path;
}
- Location get_locus () const override { return path.get_locus (); }
+ location_t get_locus () const override { return path.get_locus (); }
bool check_cfg_predicate (const Session &session) const override;
void accept_vis (ASTVisitor &vis) override;
- Location get_locus () const override { return path.get_locus (); }
+ location_t get_locus () const override { return path.get_locus (); }
bool check_cfg_predicate (const Session &session) const override;
Identifier get_ident () const { return ident; }
- Location get_locus () const override { return ident_locus; }
+ location_t get_locus () const override { return ident_locus; }
bool check_cfg_predicate (const Session &session) const override;
return std::unique_ptr<MetaNameValueStr> (clone_meta_item_inner_impl ());
}
- Location get_locus () const override { return ident_locus; }
+ location_t get_locus () const override { return ident_locus; }
bool check_cfg_predicate (const Session &session) const override;
std::vector<SimplePath> &get_paths () { return paths; };
- Location get_locus () const override { return ident_locus; }
+ location_t get_locus () const override { return ident_locus; }
bool check_cfg_predicate (const Session &session) const override;
std::vector<MetaNameValueStr> &get_values () { return strs; }
- Location get_locus () const override { return ident_locus; }
+ location_t get_locus () const override { return ident_locus; }
bool check_cfg_predicate (const Session &session) const override;
std::string as_string () const { return segment_name; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
bool is_super_segment () const { return as_string ().compare ("super") == 0; }
bool is_crate_segment () const { return as_string ().compare ("crate") == 0; }
return type;
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Identifier get_identifier () const { return identifier; }
};
void accept_vis (ASTVisitor &vis) override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
Kind get_kind () const override final { return Kind::Const; }
std::vector<Lifetime> &get_lifetime_args () { return lifetime_args; };
- Location get_locus () { return locus; }
+ location_t get_locus () { return locus; }
};
/* A segment of a path in expression, including an identifier aspect and maybe
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// TODO: is this better? Or is a "vis_pattern" better?
GenericArgs &get_generic_args ()
return convert_to_simple_path (has_opening_scope_resolution);
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
* function). Overridden in derived classes with other segments. */
virtual bool is_ident_only () const { return true; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// not pure virtual as class not abstract
virtual void accept_vis (ASTVisitor &vis);
return return_type;
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
// Segment used in type path with a function argument
// Creates a trait bound with a clone of this type path as its only element.
TraitBound *to_trait_bound (bool in_parens) const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// TODO: is this better? Or is a "vis_pattern" better?
std::unique_ptr<Type> &get_type ()
{}, UNDEF_LOCATION);
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
return segments;
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
};
} // namespace AST
} // namespace Rust
node_id (Analysis::Mappings::get ()->get_next_node_id ())
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
IdentifierPattern (IdentifierPattern &&other) = default;
IdentifierPattern &operator= (IdentifierPattern &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
: locus (locus), node_id (Analysis::Mappings::get ()->get_next_node_id ())
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
: locus (locus), node_id (Analysis::Mappings::get ()->get_next_node_id ())
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
bool get_has_minus () const { return has_minus; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override { return path.as_string (); }
- Location get_locus () const { return path.get_locus (); }
+ location_t get_locus () const { return path.get_locus (); }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override { return path.as_string (); }
- Location get_locus () const { return path.get_locus (); }
+ location_t get_locus () const { return path.get_locus (); }
void accept_vis (ASTVisitor &vis) override;
RangePattern (RangePattern &&other) = default;
RangePattern &operator= (RangePattern &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
bool get_has_ellipsis_syntax () { return has_ellipsis_syntax; }
ReferencePattern (ReferencePattern &&other) = default;
ReferencePattern &operator= (ReferencePattern &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
virtual std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
virtual void accept_vis (ASTVisitor &vis) = 0;
* is empty). */
bool has_struct_pattern_elems () const { return !elems.is_empty (); }
- Location get_locus () const override { return path.get_locus (); }
+ location_t get_locus () const override { return path.get_locus (); }
void accept_vis (ASTVisitor &vis) override;
TupleStructPattern (TupleStructPattern &&other) = default;
TupleStructPattern &operator= (TupleStructPattern &&other) = default;
- Location get_locus () const override { return path.get_locus (); }
+ location_t get_locus () const override { return path.get_locus (); }
void accept_vis (ASTVisitor &vis) override;
return *this;
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
GroupedPattern (GroupedPattern &&other) = default;
GroupedPattern &operator= (GroupedPattern &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
SlicePattern (SlicePattern &&other) = default;
SlicePattern &operator= (SlicePattern &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
AltPattern (AltPattern &&other) = default;
AltPattern &operator= (AltPattern &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
EmptyStmt (location_t locus) : locus (locus) {}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
LetStmt (LetStmt &&other) = default;
LetStmt &operator= (LetStmt &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
bool semicolon_followed;
public:
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
bool is_item () const override final { return false; }
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
return type_in_parens->to_trait_bound (true);
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
return new TraitBound (trait_bound);
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override { return "! (never type)"; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
};
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
};
return MaybeNamedParam ({""}, UNNAMED, nullptr, {}, UNDEF_LOCATION);
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// TODO: this mutable getter seems really dodgy. Think up better way.
std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
{}
const Analysis::NodeMapping &get_mappings () const { return mappings; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
const AST::AttrVec &get_outer_attrs () const { return outer_attrs; }
private:
return std::unique_ptr<LiteralExpr> (clone_literal_expr_impl ());
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
OperatorExpr &operator= (OperatorExpr &&other) = default;
public:
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
std::unique_ptr<Expr> &get_expr () { return main_or_left_expr; }
GroupedExpr (GroupedExpr &&other) = default;
GroupedExpr &operator= (GroupedExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
ArrayExpr (ArrayExpr &&other) = default;
ArrayExpr &operator= (ArrayExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
ArrayIndexExpr (ArrayIndexExpr &&other) = default;
ArrayIndexExpr &operator= (ArrayIndexExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
/* Note: syntactically, can disambiguate single-element tuple from parens with
* comma, i.e. (0,) rather than (0) */
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
TupleIndexExpr (TupleIndexExpr &&other) = default;
TupleIndexExpr &operator= (TupleIndexExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
WithInnerAttrs (std::move (inner_attribs)), locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
Analysis::NodeMapping &get_mappings () { return mappings; }
- Location get_locus () { return locus; }
+ location_t get_locus () { return locus; }
virtual StructExprFieldKind get_kind () const = 0;
// Returns whether function call has parameters.
bool has_params () const { return !params.empty (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
MethodCallExpr (MethodCallExpr &&other) = default;
MethodCallExpr &operator= (MethodCallExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
FieldAccessExpr (FieldAccessExpr &&other) = default;
FieldAccessExpr &operator= (FieldAccessExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
std::unique_ptr<Type> &get_type () { return type; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
// Base closure definition expression HIR node - abstract
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ExprType get_expression_type () const override final
{
return std::unique_ptr<BlockExpr> (clone_block_expr_impl ());
}
- Location get_locus () const override final { return start_locus; }
+ location_t get_locus () const override final { return start_locus; }
Location get_start_locus () const { return start_locus; }
label (std::move (label)), locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
BreakExpr (BreakExpr &&other) = default;
BreakExpr &operator= (BreakExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
{}
public:
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ExprType get_expression_type () const override final
{
ReturnExpr (ReturnExpr &&other) = default;
ReturnExpr &operator= (ReturnExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
UnsafeBlockExpr (UnsafeBlockExpr &&other) = default;
UnsafeBlockExpr &operator= (UnsafeBlockExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
// Returns whether the LoopLabel is in an error state.
bool is_error () const { return label.is_error (); }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Analysis::NodeMapping &get_mappings () { return mappings; }
public:
bool has_loop_label () const { return !loop_label.is_error (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
std::unique_ptr<HIR::BlockExpr> &get_loop_block () { return loop_block; };
* vector of else ifs - i.e. not like a switch statement. TODO - is this a
* better approach? or does it not parse correctly and have downsides? */
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
return std::unique_ptr<IfLetExpr> (clone_if_let_expr_impl ());
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
std::unique_ptr<Expr> &get_guard_expr () { return guard_expr; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
/* A "match case" - a correlated match arm and resulting expression. Not
MatchExpr (MatchExpr &&other) = default;
MatchExpr &operator= (MatchExpr &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
bool get_has_move () const { return has_move; }
std::unique_ptr<BlockExpr> &get_block_expr () { return block_expr; }
return lvalue_mappings;
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
private:
const Analysis::NodeMapping node_mappings;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
TypeBoundWhereClauseItem &operator= (TypeBoundWhereClauseItem &&other)
= default;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
std::string as_string () const override;
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
ImplicitSelfKind get_self_kind () const { return self_kind; }
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
std::unique_ptr<Pattern> &get_param_name () { return param_name; }
* the module. */
void add_crate_name (std::vector<std::string> &names) const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::Module; }
as_clause_name (std::move (as_clause_name)), locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::ExternCrate; }
std::string get_referenced_crate () { return referenced_crate; }
virtual std::string as_string () const = 0;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
protected:
// Clone function implementation as pure virtual method
UseDeclaration (UseDeclaration &&other) = default;
UseDeclaration &operator= (UseDeclaration &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::UseDeclaration; }
std::unique_ptr<UseTree> &get_use_tree () { return use_tree; }
Function (Function &&other) = default;
Function &operator= (Function &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRImplVisitor &vis) override;
TypeAlias (TypeAlias &&other) = default;
TypeAlias &operator= (TypeAlias &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRImplVisitor &vis) override;
// Returns whether struct has a where clause.
bool has_where_clause () const { return !where_clause.is_empty (); }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::Struct; }
std::vector<std::unique_ptr<GenericParam>> &get_generic_params ()
Analysis::NodeMapping get_mappings () const { return mappings; }
- Location get_locus () { return locus; }
+ location_t get_locus () { return locus; }
AST::AttrVec &get_outer_attrs () { return outer_attrs; }
Visibility &get_visibility () { return visibility; }
};
Visibility &get_visibility () { return visibility; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
AST::AttrVec &get_outer_attrs () { return outer_attrs; }
std::unique_ptr<HIR::Type> &get_field_type () { return field_type; }
void accept_vis (HIRStmtVisitor &vis) override;
// void accept_vis (HIRVisItemVisitor &vis) override;
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
Identifier get_identifier () const { return variant_name; }
Enum (Enum &&other) = default;
Enum &operator= (Enum &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
Identifier get_identifier () const { return union_name; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
return identifier.as_string () == std::string ("_");
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
StaticItem (StaticItem &&other) = default;
StaticItem &operator= (StaticItem &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTraitItemVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTraitItemVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTraitItemVisitor &vis) override;
Trait (Trait &&other) = default;
Trait &operator= (Trait &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
// Returns the polarity of the impl.
Polarity get_polarity () const { return polarity; }
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
std::unique_ptr<Type> &get_type () { return impl_type; };
virtual std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
virtual void accept_vis (HIRFullVisitor &vis) = 0;
virtual void accept_vis (HIRExternalItemVisitor &vis) = 0;
ExternBlock (ExternBlock &&other) = default;
ExternBlock &operator= (ExternBlock &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
std::unique_ptr<Type> &get_type () { return type; }
const std::unique_ptr<Type> &get_type () const { return type; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
class ConstGenericArg
std::vector<ConstGenericArg> &get_const_args () { return const_args; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
};
/* A segment of a path in expression, including an identifier aspect and maybe
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
PathIdentSegment &get_segment () { return segment_name; }
const PathIdentSegment &get_segment () const { return segment_name; }
return convert_to_simple_path (has_opening_scope_resolution);
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
* function). Overriden in derived classes with other segments. */
virtual bool is_ident_only () const { return true; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// not pure virtual as class not abstract
virtual void accept_vis (HIRFullVisitor &vis);
std::string as_string () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Analysis::NodeMapping get_mappings () const { return mappings; }
path_type (std::move (qual_path_type)), locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
QualifiedPathType &get_path_type () { return path_type; }
- Location get_locus () { return locus; }
+ location_t get_locus () { return locus; }
Analysis::NodeMapping get_pattern_mappings () const override final
{
locus (locus), mappings (mappings)
{}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
IdentifierPattern (IdentifierPattern &&other) = default;
IdentifierPattern &operator= (IdentifierPattern &&other) = default;
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
bool is_mut () const { return mut == Mutability::Mut; }
bool get_is_ref () const { return is_ref; }
: locus (locus), mappings (mappings)
{}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Literal get_literal () const { return literal; }
bool get_has_minus () const { return has_minus; }
std::string as_string () const override { return path.as_string (); }
- Location get_locus () const { return path.get_locus (); }
+ location_t get_locus () const { return path.get_locus (); }
PathInExpression &get_path () { return path; }
const PathInExpression &get_path () const { return path; }
std::string as_string () const override { return path.as_string (); }
- Location get_locus () const { return path.get_locus (); }
+ location_t get_locus () const { return path.get_locus (); }
void accept_vis (HIRFullVisitor &vis) override;
RangePattern (RangePattern &&other) = default;
RangePattern &operator= (RangePattern &&other) = default;
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
return mappings;
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
PatternType get_pattern_type () const override final
{
virtual void accept_vis (HIRFullVisitor &vis) = 0;
virtual ItemType get_item_type () const = 0;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Analysis::NodeMapping get_mappings () const { return mappings; };
AST::AttrVec get_outer_attrs () { return outer_attrs; }
bool has_struct_pattern_elems () const { return !elems.is_empty (); }
- Location get_locus () const override { return path.get_locus (); }
+ location_t get_locus () const override { return path.get_locus (); }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
TupleStructPattern (TupleStructPattern &&other) = default;
TupleStructPattern &operator= (TupleStructPattern &&other) = default;
- Location get_locus () const override { return path.get_locus (); }
+ location_t get_locus () const override { return path.get_locus (); }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
return *this;
}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
return items;
}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
return alts;
}
- Location get_locus () const override { return locus; }
+ location_t get_locus () const override { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
: Stmt (std::move (mappings)), locus (locus)
{}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
LetStmt (LetStmt &&other) = default;
LetStmt &operator= (LetStmt &&other) = default;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
std::string as_string () const override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
void accept_vis (HIRFullVisitor &vis) override;
return MaybeNamedParam ({""}, UNNAMED, nullptr, UNDEF_LOCATION);
}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
std::unique_ptr<Type> &get_type () { return param_type; }
virtual void accept_vis (HIRStmtVisitor &vis) = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual bool is_unit_check_needed () const { return false; }
virtual ~Expr () {}
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
const Analysis::NodeMapping &get_mappings () const { return mappings; }
virtual Analysis::NodeMapping get_pattern_mappings () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual PatternType get_pattern_type () const = 0;
virtual void accept_vis (HIRTypeVisitor &vis) = 0;
virtual Analysis::NodeMapping get_mappings () const { return mappings; }
- virtual Location get_locus () const { return locus; }
+ virtual location_t get_locus () const { return locus; }
protected:
Type (Analysis::NodeMapping mappings, location_t locus)
virtual Analysis::NodeMapping get_mappings () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual BoundType get_bound_type () const = 0;
return lifetime_type;
}
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
Analysis::NodeMapping get_mappings () const override final
{
virtual std::string as_string () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
Analysis::NodeMapping get_mappings () const { return mappings; }
void accept_vis (HIRFullVisitor &vis) override;
- Location get_locus () const override final { return locus; }
+ location_t get_locus () const override final { return locus; }
protected:
/* Use covariance to implement clone function as returning this object rather
void accept_vis (HIRFullVisitor &vis) override final;
- Location get_locus () const override final { return locus; };
+ location_t get_locus () const override final { return locus; };
bool has_default_expression () { return default_expression != nullptr; }
virtual Analysis::NodeMapping get_impl_mappings () const = 0;
- virtual Location get_locus () const = 0;
+ virtual location_t get_locus () const = 0;
virtual ImplItemType get_impl_item_type () const = 0;
TokenId get_id () const { return token_id; }
// Gets location of the token.
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
// Set location of the token.
void set_locus (location_t locus) { this->locus = locus; }
BindingTypeInfo (){};
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
Mutability get_mut () const { return mut; }
bool get_is_ref () const { return is_ref; }
HIR::TraitItem *get_hir_trait_item () const;
- Location get_locus () const;
+ location_t get_locus () const;
const Analysis::NodeMapping get_mappings () const;
return trait_error_node;
}
- Location get_locus () const;
+ location_t get_locus () const;
std::string get_name () const;
const TypeBoundPredicate *get_parent () const;
- Location get_locus () const;
+ location_t get_locus () const;
private:
const TypeBoundPredicate *parent;
: mapping (mapping), argument_type (argument_type), locus (locus)
{}
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
BaseType *get_argument_type () { return argument_type; }
// ParamTy
bool is_concrete () const;
- Location get_locus () const;
+ location_t get_locus () const;
size_t size () const;
explicit TyWithLocation (BaseType *ty);
BaseType *get_ty () const { return ty; }
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
private:
BaseType *ty;
const BaseType *destructure () const;
const RustIdent &get_ident () const;
- Location get_locus () const;
+ location_t get_locus () const;
bool has_subsititions_defined () const;
bool needs_generic_substitutions () const;
StructFieldType *monomorphized_clone () const;
void debug () const;
- Location get_locus () const;
+ location_t get_locus () const;
std::string as_string () const;
private:
const Resolver::TraitReference *get () const;
- Location get_locus () const { return locus; }
+ location_t get_locus () const { return locus; }
std::string get_name () const;