diff options
author | sanikoyes <sanikoyes@163.com> | 2014-04-06 21:52:47 +0800 |
---|---|---|
committer | sanikoyes <sanikoyes@163.com> | 2014-04-06 21:52:47 +0800 |
commit | 77a840e350668a9c80b1e63b9b73aac44221c53b (patch) | |
tree | 40d2115e639bdc72a61811ac4f2fb0f04ec8eb7f /modules/gdscript/gd_tokenizer.cpp | |
parent | 14bbdcb139b35e6d206df1ab3176d34245b72329 (diff) | |
parent | ded365031ede27b7a6efef59bc886343f58d310b (diff) |
Merge branch 'master' into hotfix-android-unicode-ime-input
Diffstat (limited to 'modules/gdscript/gd_tokenizer.cpp')
-rw-r--r-- | modules/gdscript/gd_tokenizer.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp index ff9be7926b..aeee1f6667 100644 --- a/modules/gdscript/gd_tokenizer.cpp +++ b/modules/gdscript/gd_tokenizer.cpp @@ -242,6 +242,24 @@ void GDTokenizerText::_advance() { case 0: _make_token(TK_EOF); break; + case '\\': + INCPOS(1); + if (GETCHAR(0)=='\r') { + INCPOS(1); + } + + if (GETCHAR(0)!='\n') { + _make_error("Expected newline after '\\'."); + return; + } + + INCPOS(1); + + while(GETCHAR(0)==' ' || GETCHAR(0)=='\t') { + INCPOS(1); + } + + continue; case '\t': case '\r': case ' ': |