You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Bug Fixes
-=-=-=-=- -Fixed problem with scaling shapes (#827), related to not taking scale in consideration for calculating the moment of inertia -Added support for multiline strings (or comments) using """ -Save subscene bug, properties not being saved in root node (#806) -Fix Crash in CollisionPolygon2DEditor (#814) -Restored Ability to compile without 3D (#795) -Fix InterpolatedCamera (#803) -Fix UV Import for OBJ Meshes (#771) -Fixed issue with modifier gizmos (#794) -Fixed CapsuleShape gizmo handle (#50) -Fixed Import Button (not properly working in 3D) (#733) -Many misc fixes (though no new features)
This commit is contained in:
@@ -239,8 +239,7 @@ void GDTokenizerText::_advance() {
|
||||
|
||||
|
||||
bool is_node_path = false;
|
||||
bool is_string = false;
|
||||
bool is_string_alt = false;
|
||||
StringMode string_mode=STRING_DOUBLE_QUOTE;
|
||||
|
||||
switch(GETCHAR(0)) {
|
||||
case 0:
|
||||
@@ -538,22 +537,35 @@ void GDTokenizerText::_advance() {
|
||||
is_node_path=true;
|
||||
|
||||
case '\'':
|
||||
is_string_alt = true;
|
||||
string_mode=STRING_SINGLE_QUOTE;
|
||||
case '"': {
|
||||
is_string = is_string_alt ? false : true;
|
||||
|
||||
int i=1;
|
||||
if (string_mode==STRING_DOUBLE_QUOTE && GETCHAR(i)=='"' && GETCHAR(i+1)=='"') {
|
||||
i+=2;
|
||||
string_mode=STRING_MULTILINE;
|
||||
|
||||
}
|
||||
|
||||
|
||||
String str;
|
||||
while(true) {
|
||||
if (CharType(GETCHAR(i)==0)) {
|
||||
if (CharType(GETCHAR(i))==0) {
|
||||
|
||||
_make_error("Unterminated String");
|
||||
return;
|
||||
} else if( CharType(GETCHAR(i)=='"') && is_string ) {
|
||||
} else if( string_mode==STRING_DOUBLE_QUOTE && CharType(GETCHAR(i))=='"' ) {
|
||||
break;
|
||||
} else if( CharType(GETCHAR(i)=='\'') && is_string_alt ) {
|
||||
break;
|
||||
} else if (CharType(GETCHAR(i)=='\\')) {
|
||||
} else if( string_mode==STRING_SINGLE_QUOTE && CharType(GETCHAR(i))=='\'' ) {
|
||||
break;
|
||||
} else if( string_mode==STRING_MULTILINE && CharType(GETCHAR(i))=='\"' && CharType(GETCHAR(i+1))=='\"' && CharType(GETCHAR(i+2))=='\"') {
|
||||
i+=2;
|
||||
break;
|
||||
} else if( string_mode!=STRING_MULTILINE && CharType(GETCHAR(i))=='\n') {
|
||||
_make_error("Unexpected EOL at String.");
|
||||
return;
|
||||
|
||||
} else if (CharType(GETCHAR(i))=='\\') {
|
||||
//escaped characters...
|
||||
i++;
|
||||
CharType next = GETCHAR(i);
|
||||
|
||||
Reference in New Issue
Block a user