File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1001,14 +1001,14 @@ pub fn to_moonbit_ident(name: impl AsRef<str>) -> String {
10011001 // Reserved keywords
10021002 | "module" | "move" | "ref" | "static" | "super" | "unsafe" | "use" | "where" | "await"
10031003 | "dyn" | "abstract" | "do" | "final" | "macro" | "override" | "typeof" | "virtual" | "yield"
1004- | "local" | "method" | "alias" | "assert" | "recur" | "isnot" | "define" | "downcast"
1004+ | "local" | "method" | "alias" | "assert" | "package" | " recur" | "isnot" | "define" | "downcast"
10051005 | "inherit" | "member" | "namespace" | "upcast" | "void" | "lazy" | "include" | "mixin"
10061006 | "protected" | "sealed" | "constructor" | "atomic" | "volatile" | "anyframe" | "anytype"
10071007 | "asm" | "comptime" | "errdefer" | "export" | "opaque" | "orelse" | "resume" | "threadlocal"
10081008 | "unreachable" | "dynclass" | "dynobj" | "dynrec" | "var" | "finally" | "noasync" => {
1009- format ! ( "{name}_" )
1009+ format ! ( "{name}_" )
10101010 }
1011- _ => name. to_snake_case ( ) ,
1011+ _ => name. strip_prefix ( "[async]" ) . unwrap_or ( name ) . to_snake_case ( ) ,
10121012 }
10131013}
10141014
You can’t perform that action at this time.
0 commit comments