Skip to main content

classify_value

Function classify_value 

Source
pub fn classify_value(value: &Option<String>) -> ChunkOptionValue
Expand description

Classify a chunk option value as either simple (convertible) or expression (skip).

Conservative approach: only classify as Simple if we’re certain it’s a literal. When in doubt, classify as Expression to avoid breaking R code.

Note: The parser strips quotes from values, so we receive the inner string. For label="my chunk", value is "my chunk" (no quotes).