1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add editor highlight for type-safe lines

The line number is hightlighted to indicate that the line contains only
type-safe code.
This commit is contained in:
George Marques
2018-06-05 13:50:21 -03:00
parent a2305cd8b2
commit 03746da73f
18 changed files with 250 additions and 118 deletions

View File

@@ -115,11 +115,11 @@ void GDScriptLanguage::make_template(const String &p_class_name, const String &p
p_script->set_source_code(src);
}
bool GDScriptLanguage::validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions) const {
bool GDScriptLanguage::validate(const String &p_script, int &r_line_error, int &r_col_error, String &r_test_error, const String &p_path, List<String> *r_functions, Set<int> *r_safe_lines) const {
GDScriptParser parser;
Error err = parser.parse(p_script, p_path.get_base_dir(), true, p_path);
Error err = parser.parse(p_script, p_path.get_base_dir(), true, p_path, false, r_safe_lines);
if (err) {
r_line_error = parser.get_error_line();
r_col_error = parser.get_error_column();