summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_parser.cpp
diff options
context:
space:
mode:
authorkoalefant <mandarin.cake@gmail.com>2015-11-29 23:45:28 +0100
committerkoalefant <mandarin.cake@gmail.com>2015-11-29 23:45:28 +0100
commite52d211b61fc508675c9b7d909cb3acbddae16c4 (patch)
tree204b9c35484b844ab0962497202a1d11fddfd0e0 /modules/gdscript/gd_parser.cpp
parentb0dbcccb6c430cdf8a8f050676427f2414037ef7 (diff)
GDScript: fixed highlighting of the next line when colon is missing
Diffstat (limited to 'modules/gdscript/gd_parser.cpp')
-rw-r--r--modules/gdscript/gd_parser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index 202ab76da0..c55bfee591 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -65,8 +65,10 @@ bool GDParser::_enter_indent_block(BlockNode* p_block) {
if (tokenizer->get_token()!=GDTokenizer::TK_COLON) {
-
- _set_error("':' expected at end of line.");
+ // report location at the previous token (on the previous line)
+ int error_line = tokenizer->get_token_line(-1);
+ int error_column = tokenizer->get_token_column(-1);
+ _set_error("':' expected at end of line.",error_line,error_column);
return false;
}
tokenizer->advance();