mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-06 23:18:45 +00:00
bug fixes, tests passed, result modifier (!) added to function arguments and to types
This commit is contained in:
parent
4470454838
commit
3914ff7d8b
16 changed files with 418 additions and 62 deletions
|
|
@ -15,10 +15,18 @@ public:
|
|||
|
||||
SymbolDocs(const std::string &description) : description_(description) {}
|
||||
|
||||
template <typename T>
|
||||
bool add_annotation_info(const std::string &annotation, T &&info) {
|
||||
bool add_annotation_info(const std::string &annotation, std::string &&info) {
|
||||
if (annotations_info_.count(annotation) == 0) {
|
||||
annotations_info_[annotation] = std::forward<T>(info);
|
||||
annotations_info_[annotation] = std::move(info);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool add_annotation_info(const std::string &annotation,
|
||||
const std::string &info) {
|
||||
if (annotations_info_.count(annotation) == 0) {
|
||||
annotations_info_[annotation] = info;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue