Skip to main content

shape_of

Function shape_of 

Source
pub fn shape_of(query: &str) -> Shape
Expand description

Whether a query is shaped like an identifier or like a question.

The rule is deliberately crude and entirely inspectable: one token, made of the characters an identifier is made of, is an identifier. Everything else is a question. A crude rule that a user can predict beats an accurate one they cannot, because the shape is reported in the answer and prefer is there to overrule it.