diff --git a/rox_compiler/src/common.rs b/rox_compiler/src/common.rs index 970aec9..3183e4d 100644 --- a/rox_compiler/src/common.rs +++ b/rox_compiler/src/common.rs @@ -19,15 +19,15 @@ impl PropertiesOverride{ impl std::fmt::Display for PropertiesOverride{ fn fmt(&self,f:&mut std::fmt::Formatter<'_>)->std::fmt::Result{ if let Some(name)=self.name.as_deref(){ - writeln!(f,"--!Properties.Name = \"{}\"",name)?; + writeln!(f,"-- Properties.Name = \"{}\"",name)?; } if let Some(class)=self.class.as_deref(){ - writeln!(f,"--!Properties.ClassName = \"{}\"",class)?; + writeln!(f,"-- Properties.ClassName = \"{}\"",class)?; } Ok(()) } } pub(crate) fn sanitize<'a>(s:&'a str)->std::borrow::Cow<'a,str>{ - lazy_regex::regex!(r"[^A-z0-9.-]").replace_all(s,"_") + lazy_regex::regex!(r"[^A-Za-z0-9.-]").replace_all(s,"_") } diff --git a/rox_compiler/src/compile.rs b/rox_compiler/src/compile.rs index 81c5b95..8fde920 100644 --- a/rox_compiler/src/compile.rs +++ b/rox_compiler/src/compile.rs @@ -203,7 +203,7 @@ impl ScriptWithOverrides{ let mut count=0; for line in source.lines(){ //only string type properties are supported atm - if let Some(captures)=lazy_regex::regex!(r#"^\-\-\!\s*Properties\.([A-z]\w*)\s*\=\s*"(\w+)"$"#) + if let Some(captures)=lazy_regex::regex!(r#"^\-\-\s*Properties\.([A-Za-z]\w*)\s*\=\s*"(\w+)"$"#) .captures(line){ count+=line.len(); match &captures[1]{