MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / nested_block_comment

Function nested_block_comment

nodedb-sql/src/parser/preprocess/lex.rs:372–384  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

370
371 #[test]
372 fn nested_block_comment() {
373 let segs = segments("SELECT /* /* nested */ <-> */ x");
374 // The outer `/* ... */` includes everything including `<->`.
375 assert!(
376 segs.iter()
377 .any(|s| matches!(s, SqlSegment::BlockComment(c) if c.contains("<->")))
378 );
379 for s in &segs {
380 if let SqlSegment::Text(t) = s {
381 assert!(!t.contains("<->"), "nested <-> leaked into Text: {t}");
382 }
383 }
384 }
385
386 #[test]
387 fn doubled_quote_escape_in_string() {

Callers

nothing calls this directly

Calls 1

segmentsFunction · 0.85

Tested by

no test coverage detected