Explorar o código

document isFormatExpr limitation (closes #3201)

Simon Krajewski %!s(int64=11) %!d(string=hai) anos
pai
achega
4619c77717
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      std/haxe/macro/MacroStringTools.hx

+ 4 - 0
std/haxe/macro/MacroStringTools.hx

@@ -46,6 +46,10 @@ class MacroStringTools {
 		Tells if `e` is a format string, i.e. uses single quotes `'` as
 		delimiters.
 
+		This only works if `e` has a position which the compiler can find. While
+		this is true for any expressions appearing in real Haxe code (i.e. some
+		.hx file), it might not work for expressions generated by macros.
+
 		This operation depends on the position of `e`.
 	**/
 	static public function isFormatExpr(e:ExprOf<String>) {