Skip to main content

is_marked

Function is_marked 

Source
pub fn is_marked(language: Language, tokens: &[Token]) -> bool
Expand description

Whether a node’s own leading tokens mark it as test code.

tokens is the node’s token slice, starting at the first token the node covers; both markers this reads sit at the front of an item, so they are always at the front of that slice.

Only the front is read, so a test or a TEST appearing later — as the item’s own name, a parameter, a called function — is never a marker.