big_code_analysis_ast/getter/ccomment.rs
1//! `Getter` implementation for C comments.
2#![allow(clippy::wildcard_imports, clippy::enum_glob_use)]
3
4use super::*;
5
6impl Getter for CcommentCode {
7 // Every row is `absent`, so this answers `Unknown` for every node;
8 // reading the rows rather than inheriting a default is what lets
9 // the trait require the method of every language (#1693).
10 keyword_roles!(ccomment);
11
12 // No row of `roles/ccomment.rs` opens a space.
13 impl_byte_less_space_kind!(ccomment);
14
15 fn get_space_kind_with_code<'a>(
16 node: &Node<'a>,
17 code: &[u8],
18 ancestors: Ancestors<'a, '_>,
19 ) -> SpaceKind {
20 crate::roles::ccomment::opens_space(node, code, ancestors)
21 }
22}