diff options
| author | Juan Linietsky | 2014-04-05 18:50:09 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-04-05 18:50:09 -0300 |
| commit | b4969373b3475799d6b24cdffeda4659c37f0b8a (patch) | |
| tree | 5cafdea68a5fe1f79c343c7cdf8def821e7f0b05 /modules/gdscript/gd_tokenizer.cpp | |
| parent | 9f33134c93ecbadda70e8eefc50563e29b2eb7f2 (diff) | |
| download | godot-b4969373b3475799d6b24cdffeda4659c37f0b8a.tar.gz godot-b4969373b3475799d6b24cdffeda4659c37f0b8a.tar.zst godot-b4969373b3475799d6b24cdffeda4659c37f0b8a.zip | |
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 ff9be7926..aeee1f666 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 ' ': |
