mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 17:52:08 -10:00
This will check if the type names specified in the argument lists of scripting functions actually refer to valid type scripting names.
31 lines
576 B
C++
31 lines
576 B
C++
#pragma once
|
|
|
|
#include "globalincs/pstypes.h"
|
|
|
|
#include "ade_doc.h"
|
|
|
|
namespace scripting {
|
|
|
|
struct argument_def {
|
|
ade_type_info type;
|
|
SCP_string name;
|
|
SCP_string def_val;
|
|
bool optional = false;
|
|
SCP_string comment;
|
|
};
|
|
|
|
class argument_list_parser {
|
|
public:
|
|
explicit argument_list_parser(const SCP_vector<SCP_string>& validTypeNames);
|
|
|
|
bool parse(const SCP_string& argumentList);
|
|
|
|
const SCP_vector<scripting::argument_def>& getArgList() const;
|
|
|
|
private:
|
|
SCP_unordered_set<SCP_string> _validTypeNames;
|
|
SCP_vector<argument_def> _argList;
|
|
};
|
|
|
|
} // namespace scripting
|