Browse Source

Fixed issue https://github.com/marcobambini/gravity/issues/117

Marco Bambini 8 years ago
parent
commit
d24fa50d12
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/compiler/gravity_parser.c

+ 3 - 0
src/compiler/gravity_parser.c

@@ -686,6 +686,9 @@ static gnode_t *parse_analyze_literal_string (gravity_parser_t *parser, gtoken_s
 	}
 	
 return_string:
+	// append the last string if any and if interpolation mode is on
+	if (r && length) gnode_array_push(r, gnode_literal_string_expr_create(token, buffer, length, true));
+	
 	// return a node (even in case of error) so its memory will be automatically freed
 	return (r) ? gnode_string_interpolation_create(token, r) : gnode_literal_string_expr_create(token, buffer, length, true);
 }