MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_js_space

Function is_js_space

codegraph-kernel/src/php.rs:1630–1637  ·  view source on GitHub ↗

JS `\s` (WhiteSpace ∪ LineTerminator): unlike Rust's `char::is_whitespace`, U+FEFF yes and U+0085 no.

(c: char)

Source from the content-addressed store, hash-verified

1628/// JS `\s` (WhiteSpace ∪ LineTerminator): unlike Rust's
1629/// `char::is_whitespace`, U+FEFF yes and U+0085 no.
1630fn is_js_space(c: char) -> bool {
1631 matches!(
1632 c,
1633 '\t' | '\n' | '\x0B' | '\x0C' | '\r' | ' ' | '\u{00A0}' | '\u{1680}'
1634 | '\u{2000}'..='\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}'
1635 | '\u{3000}' | '\u{FEFF}'
1636 )
1637}
1638
1639/// PHP_OWN_DIRECTORY (languages/php.ts), matched on the head's text with JS
1640/// whitespace removed: `__DIR__`, `dirname(__FILE__)`, `\dirname(__DIR__)`,

Callers 2

php_use_shadows_dirnameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected