MCPcopy Create free account
hub / github.com/PRQL/prql / write_ident_part

Function write_ident_part

prqlc/prqlc/src/codegen/ast.rs:349–355  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

347}
348
349pub fn write_ident_part(s: &str) -> Cow<'_, str> {
350 if valid_prql_ident().is_match(s) && !keywords().contains(s) {
351 s.into()
352 } else {
353 format!("`{s}`").into()
354 }
355}
356
357impl WriteSource for Vec<pr::Stmt> {
358 fn write(&self, mut opt: WriteOpt) -> Option<String> {

Callers 1

writeMethod · 0.85

Calls 2

valid_prql_identFunction · 0.85
keywordsFunction · 0.85

Tested by

no test coverage detected