Extra operations to test properties of a `char` based on the language semantics.
| 198 | |
| 199 | /// Extra operations to test properties of a `char` based on the language semantics. |
| 200 | trait CharOps { |
| 201 | /// Returns true if the current character should be considered as finishing a previous token. |
| 202 | fn is_separator(&self) -> bool; |
| 203 | |
| 204 | /// Returns true if the character is a space. |
| 205 | /// |
| 206 | /// Use this instead of `is_whitespace`, which accounts for newlines but we need to handle |
| 207 | /// those explicitly. |
| 208 | fn is_space(&self) -> bool; |
| 209 | |
| 210 | /// Returns true if the character can be part of an identifier. |
| 211 | fn is_word(&self) -> bool; |
| 212 | } |
| 213 | |
| 214 | impl CharOps for char { |
| 215 | fn is_separator(&self) -> bool { |
nothing calls this directly
no outgoing calls
no test coverage detected