(content: &[u8], i: usize)
| 1615 | /// `$node?->class` to avoid false positives. |
| 1616 | #[inline] |
| 1617 | fn is_keyword_boundary(content: &[u8], i: usize) -> bool { |
| 1618 | if i == 0 { |
| 1619 | return true; |
| 1620 | } |
| 1621 | |
| 1622 | let prev = content[i - 1]; |
| 1623 | if !is_boundary_char(prev) { |
| 1624 | return false; |
| 1625 | } |
| 1626 | |
| 1627 | // Reject object/nullsafe property access: ->class, ?->class |
| 1628 | if prev == b'>' && i >= 2 { |
| 1629 | let prev2 = content[i - 2]; |
| 1630 | if prev2 == b'-' || prev2 == b'?' { |
| 1631 | return false; |
| 1632 | } |
| 1633 | } |
| 1634 | |
| 1635 | true |
| 1636 | } |
| 1637 | |
| 1638 | /// Read the constant name from the first argument of a `define()` call. |
| 1639 | /// |
no test coverage detected