diff options
| author | Juan Linietsky | 2015-12-31 10:25:21 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2015-12-31 10:25:21 -0300 |
| commit | 586e482a98702055ed7323a3e81c14392233b650 (patch) | |
| tree | db598dab3bd8e6777d3cb85be4319d589380a5fd /core/variant_parser.cpp | |
| parent | b60a3e72028349493effe26811725d420c7e125b (diff) | |
| download | godot-586e482a98702055ed7323a3e81c14392233b650.tar.gz godot-586e482a98702055ed7323a3e81c14392233b650.tar.zst godot-586e482a98702055ed7323a3e81c14392233b650.zip | |
Diffstat (limited to 'core/variant_parser.cpp')
| -rw-r--r-- | core/variant_parser.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 43938c759..2d5b89258 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -120,6 +120,20 @@ Error VariantParser::get_token(Stream *p_stream, Token& r_token, int &line, Stri r_token.type=TK_COLON; return OK; }; + case ';': { + + while(true) { + CharType ch=p_stream->get_char(); + if (p_stream->is_eof()) { + r_token.type=TK_EOF; + return OK; + } + if (ch=='\n') + break; + } + + break; + }; case ',': { r_token.type=TK_COMMA; @@ -1591,6 +1605,18 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r if (p_stream->is_eof()) return ERR_FILE_EOF; + if (c==';') { //comment + while(true) { + CharType ch=p_stream->get_char(); + if (p_stream->is_eof()) { + return ERR_FILE_EOF; + } + if (ch=='\n') + break; + } + continue; + } + if (c=='[' && what.length()==0) { //it's a tag! p_stream->saved='['; //go back one |
