Browse Source

[lua] move Rex flag initialization into static var declaration

Justin Donaldson 9 years ago
parent
commit
98291bf2f6
1 changed files with 1 additions and 3 deletions
  1. 1 3
      std/lua/_std/EReg.hx

+ 1 - 3
std/lua/_std/EReg.hx

@@ -32,7 +32,7 @@ class EReg {
 	var s : String; // the last matched string
 	var s : String; // the last matched string
 	var m : Table<Int,Int>; // the [start:Int, end:Int, and submatches:String (matched groups)] as a single table.
 	var m : Table<Int,Int>; // the [start:Int, end:Int, and submatches:String (matched groups)] as a single table.
 
 
-	static var FLAGS: Table<String, Int>; // Available PCRE flags
+	static var FLAGS = Rex.flags();
 
 
 	public function new( r : String, opt : String ) : Void {
 	public function new( r : String, opt : String ) : Void {
 		var ropt = 0;
 		var ropt = 0;
@@ -157,8 +157,6 @@ class EReg {
 		if (Rex == null){
 		if (Rex == null){
 			throw "Rex is missing.  Please install lrexlib-pcre.";
 			throw "Rex is missing.  Please install lrexlib-pcre.";
 		}
 		}
-		FLAGS = Rex.flags();
 	}
 	}
-
 }
 }