Explorar o código

fixed $ escaping

Nicolas Cannasse %!s(int64=14) %!d(string=hai) anos
pai
achega
99b1d3ab9e
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      std/haxe/macro/Format.hx

+ 6 - 0
std/haxe/macro/Format.hx

@@ -97,6 +97,12 @@ class Format {
 				var len = i - start;
 				var ident = str.substr(start, len);
 				add( { expr : EConst(CIdent(ident)), pos : make(len) } );
+			} else if( c == '$'.code ) {
+				start = i++;
+				continue;
+			} else {
+				start = i - 1;
+				continue;
 			}
 			start = i;
 		}