use lazy_static::lazy_static;
use preserves::value::Set;
lazy_static! {
static ref RUST_KEYWORDS: Set<&'static str> = vec![
"as",
"break",
"const",
"continue",
"crate",
"else",
"enum",
"extern",
"false",
"fn",
"for",
"if",
"impl",
"in",
"let",
"loop",
"match",
"mod",
"move",
"mut",
"pub",
"ref",
"return",
"self",
"Self",
"static",
"struct",
"super",
"trait",
"true",
"type",
"unsafe",
"use",
"where",
"while",
"async",
"await",
"dyn",
"abstract",
"become",
"box",
"do",
"final",
"macro",
"override",
"priv",
"typeof",
"unsized",
"virtual",
"yield",
"try",
"macro_rules",
"union",
"static",
].into_iter().collect();
}
pub fn escape_kw(s: String) -> String {
if RUST_KEYWORDS.contains(s.as_str()) {
s + "_"
} else {
s
}
}