Skip to content

Commit

Permalink
Haxe 4.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
YellowAfterlife committed Feb 22, 2021
1 parent 246854c commit 01e7c53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/GenCopy.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class GenCopy {
}
public static function ready(dir:String) {
var rxArch = ~/^(.+):(\w+)$/;
var rxRxEsc = new EReg('([.+?^${}()|[\\]\\/\\\\])', 'g'); // no *
var rxRxEsc = new EReg("([.+?^${}()|[\\]\\/\\\\])", 'g'); // no *
for (item in items) {
var to = item.to;
// process `:arch` suffix in $to:
Expand Down
4 changes: 2 additions & 2 deletions src/YyBuf.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class YyBuf extends StringBuf {
if (v23) addString(",");
}
public function addValue(val:Dynamic) {
if (Std.is(val, Array)) {
if (val is Array) {
var arr:Array<Dynamic> = val;
if (v23 && arr.length == 0) {
addString("[]");
Expand All @@ -61,7 +61,7 @@ class YyBuf extends StringBuf {
arrayClose();
}
}
else if (Std.is(val, String)) {
else if (val is String) {
var s = Json.stringify(val);
if (!v23) s = StringTools.replace(s, "/", "\\/"); // off-spec
addString(s);
Expand Down

0 comments on commit 01e7c53

Please sign in to comment.