Skip to main content

normalize_agent

Function normalize_agent 

Source
pub fn normalize_agent(source: &str) -> Result<String, JsValue>
Expand description

Parse AgentScript source, then serialize it back.

This is useful for formatting/normalizing AgentScript code.

§Arguments

  • source - The AgentScript source code to parse and reserialize

§Returns

  • Ok(String) - The normalized AgentScript source code
  • Err(JsValue) - Error message if parsing or serialization fails