Skip to main content

validate_agent

Function validate_agent 

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

Validate AgentScript source code without returning the full AST.

Returns true if the source is valid, or throws an error with the parse errors if invalid.

§Arguments

  • source - The AgentScript source code to validate

§Returns

  • Ok(true) - The source is valid AgentScript
  • Err(JsValue) - Error messages if parsing fails