Added REGEX!!!!!

Started working on automatic imports
This commit is contained in:
NeeEoo
2024-04-25 21:29:49 +02:00
parent 238c24501b
commit ad93c1bc18
8 changed files with 222 additions and 101 deletions
+1 -12
View File
@@ -48,6 +48,7 @@ enum Error
EUnexpected( s : String );
EUnterminatedString;
EUnterminatedComment;
EUnterminatedRegex;
EInvalidPreprocessor( msg : String );
EUnknownVariable( v : String );
EInvalidIterator( v : String );
@@ -79,16 +80,4 @@ enum abstract ErrorMessage(Int) from Int to Int {
case EXPECT_KEY_VALUE_SYNTAX: "Expected a => b";
}
}
public static function fromString(s:String):ErrorMessage {
return switch(s) {
case "INVALID_CHAR_CODE_MULTI": INVALID_CHAR_CODE_MULTI;
case "FROM_CHAR_CODE_NON_INT": FROM_CHAR_CODE_NON_INT;
case "EMPTY_INTERPOLATION": EMPTY_INTERPOLATION;
case "UNKNOWN_MAP_TYPE": UNKNOWN_MAP_TYPE;
case "UNKNOWN_MAP_TYPE_RUNTIME": UNKNOWN_MAP_TYPE_RUNTIME;
case "EXPECT_KEY_VALUE_SYNTAX": EXPECT_KEY_VALUE_SYNTAX;
default: throw "Unknown ErrorMessage";
}
}
}