| 1807 | } |
| 1808 | |
| 1809 | void GDScriptParser::clear_unused_annotations() { |
| 1810 | for (const AnnotationNode *annotation : annotation_stack) { |
| 1811 | push_error(vformat(R"(Annotation "%s" does not precede a valid target, so it will have no effect.)", annotation->name), annotation); |
| 1812 | } |
| 1813 | |
| 1814 | annotation_stack.clear(); |
| 1815 | } |
| 1816 | |
| 1817 | bool GDScriptParser::register_annotation(const MethodInfo &p_info, uint32_t p_target_kinds, AnnotationAction p_apply, const Vector<Variant> &p_default_arguments, bool p_is_vararg) { |
| 1818 | ERR_FAIL_COND_V_MSG(valid_annotations.has(p_info.name), false, vformat(R"(Annotation "%s" already registered.)", p_info.name)); |