39 #ifndef ARGMATCHER_HPP
40 #define ARGMATCHER_HPP 1
87 s_warn_on_partial_match = on;
194 return m_formal_data.size() + m_has_dots;
257 return s_warn_on_partial_match;
266 static bool s_warn_on_partial_match;
275 enum MatchStatus {UNMATCHED = 0, EXACT_TAG, PARTIAL_TAG, POSITIONAL};
277 GCEdge<const PairList> m_formals;
280 typedef std::vector<FormalData, Allocator<FormalData> > FormalVector;
281 FormalVector m_formal_data;
284 bool operator()(
const String* l,
const String* r)
const
286 return l->stdstring() < r->stdstring();
291 typedef std::map<
const String*,
unsigned int, Comparator,
292 Allocator<std::pair<
const String*,
293 unsigned int> > > FormalMap;
294 FormalMap m_formal_index;
298 struct SuppliedData {
301 FormalMap::const_iterator fm_iter;
307 typedef std::list<SuppliedData, Allocator<SuppliedData> > SuppliedList;
311 static void handleDots(Frame* frame, SuppliedList* supplied_list);
315 static bool isPrefix(
const String* shorter,
const String* longer);
321 static void makeBinding(Environment* target_env,
const FormalData& fdata,
322 RObject* supplied_value);
326 static void unusedArgsError(
const SuppliedList& supplied_list);
330 #endif // ARGMATCHER_HPP