Skip to main content

Crate busbar_sf_agentscript

Crate busbar_sf_agentscript 

Source
Expand description

§busbar-sf-agentscript

A Rust parser for Salesforce’s AgentScript language with graph analysis and WebAssembly support.

§Feature Flags

  • graph - Enable graph analysis, validation, and rendering (brings in petgraph)
  • wasm - Enable WebAssembly bindings for browser use

§Quick Start

use busbar_sf_agentscript::{parse, AgentFile};

let ast = parse(source).unwrap();

// With the `graph` feature:
use busbar_sf_agentscript::graph::RefGraph;
let graph = RefGraph::from_ast(&ast).unwrap();
println!("{} topics", graph.node_count());

Re-exports§

pub use ast::AgentFile;
pub use ast::Expr;
pub use ast::Reference;
pub use ast::Spanned;
pub use ast::Type;
pub use error::AgentScriptError;
pub use error::ErrorReporter;
pub use parser::parse;
pub use parser::parse_with_structured_errors;
pub use serializer::serialize;
pub use validation::validate_ast;

Modules§

ast
Abstract Syntax Tree types for AgentScript.
error
Error types and error reporting for AgentScript.
graph
graph
lexer
Lexer for AgentScript source code.
parser
Parser for AgentScript source code.
serializer
AST Serializer - Convert AgentScript AST back to source text.
validation
wasm
WebAssembly bindings for the AgentScript parser.

Functions§

parse_source
Parse AgentScript source code into an AST.