Returns the string representation of this node kind.
(&self)
| 88 | impl NodeKind { |
| 89 | /// Returns the string representation of this node kind. |
| 90 | pub fn as_str(&self) -> &'static str { |
| 91 | match self { |
| 92 | NodeKind::File => "file", |
| 93 | NodeKind::Module => "module", |
| 94 | NodeKind::Struct => "struct", |
| 95 | NodeKind::Enum => "enum", |
| 96 | NodeKind::EnumVariant => "enum_variant", |
| 97 | NodeKind::Trait => "trait", |
| 98 | NodeKind::Function => "function", |
| 99 | NodeKind::Method => "method", |
| 100 | NodeKind::Impl => "impl", |
| 101 | NodeKind::Const => "const", |
| 102 | NodeKind::Static => "static", |
| 103 | NodeKind::TypeAlias => "type_alias", |
| 104 | NodeKind::Field => "field", |
| 105 | NodeKind::Macro => "macro", |
| 106 | NodeKind::Use => "use", |
| 107 | NodeKind::Class => "class", |
| 108 | NodeKind::Interface => "interface", |
| 109 | NodeKind::Constructor => "constructor", |
| 110 | NodeKind::Annotation => "annotation", |
| 111 | NodeKind::AnnotationUsage => "annotation_usage", |
| 112 | NodeKind::Package => "package", |
| 113 | NodeKind::InnerClass => "inner_class", |
| 114 | NodeKind::InitBlock => "init_block", |
| 115 | NodeKind::AbstractMethod => "abstract_method", |
| 116 | NodeKind::InterfaceType => "interface_type", |
| 117 | NodeKind::StructMethod => "struct_method", |
| 118 | NodeKind::GoPackage => "go_package", |
| 119 | NodeKind::StructTag => "struct_tag", |
| 120 | NodeKind::ScalaObject => "object", |
| 121 | NodeKind::CaseClass => "case_class", |
| 122 | NodeKind::ScalaPackage => "scala_package", |
| 123 | NodeKind::ValField => "val", |
| 124 | NodeKind::VarField => "var", |
| 125 | NodeKind::GenericParam => "generic_param", |
| 126 | NodeKind::ArrowFunction => "arrow_function", |
| 127 | NodeKind::Decorator => "decorator", |
| 128 | NodeKind::Export => "export", |
| 129 | NodeKind::Namespace => "namespace", |
| 130 | NodeKind::Union => "union", |
| 131 | NodeKind::Typedef => "typedef", |
| 132 | NodeKind::Include => "include", |
| 133 | NodeKind::PreprocessorDef => "preprocessor_def", |
| 134 | NodeKind::Template => "template", |
| 135 | NodeKind::DataClass => "data_class", |
| 136 | NodeKind::SealedClass => "sealed_class", |
| 137 | NodeKind::CompanionObject => "companion_object", |
| 138 | NodeKind::KotlinObject => "kotlin_object", |
| 139 | NodeKind::KotlinPackage => "kotlin_package", |
| 140 | NodeKind::Property => "property", |
| 141 | NodeKind::Mixin => "mixin", |
| 142 | NodeKind::Extension => "extension", |
| 143 | NodeKind::Library => "library", |
| 144 | NodeKind::Delegate => "delegate", |
| 145 | NodeKind::Event => "event", |
| 146 | NodeKind::Record => "record", |
| 147 | NodeKind::CSharpProperty => "csharp_property", |
no outgoing calls