diff --git a/baml_language/Cargo.lock b/baml_language/Cargo.lock index 2fe6f6ffee..aa6998d861 100644 --- a/baml_language/Cargo.lock +++ b/baml_language/Cargo.lock @@ -130,6 +130,7 @@ dependencies = [ "baml_syntax", "baml_thir", "baml_workspace", + "rowan", "salsa", ] @@ -150,6 +151,9 @@ dependencies = [ "baml_parser", "baml_syntax", "baml_workspace", + "la-arena", + "rowan", + "rustc-hash 2.1.1", "salsa", ] @@ -897,6 +901,12 @@ dependencies = [ "libc", ] +[[package]] +name = "la-arena" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3752f229dcc5a481d60f385fa479ff46818033d881d2d801aa27dffcfb5e8306" + [[package]] name = "lazy_static" version = "1.5.0" diff --git a/baml_language/Cargo.toml b/baml_language/Cargo.toml index 523df316e4..251bd80cad 100644 --- a/baml_language/Cargo.toml +++ b/baml_language/Cargo.toml @@ -36,9 +36,11 @@ divan = { package = "codspeed-divan-compat", version = "*" } glob = { version = "0.3" } insta = { version = "1.34", features = ["yaml", "redactions"] } insta-cmd = { version = "0.6.0" } +la-arena = { version = "0.3" } logos = { version = "0.15" } pretty_assertions = { version = "1.4" } rowan = { version = "0.16" } +rustc-hash = { version = "2.1" } # When updating salsa, make sure to also update the revision in `fuzz/Cargo.toml` salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "cdd0b85516a52c18b8a6d17a2279a96ed6c3e198", default-features = false, features = [ "compact_str", diff --git a/baml_language/crates/baml_db/Cargo.toml b/baml_language/crates/baml_db/Cargo.toml index ce282052de..4b54c617a0 100644 --- a/baml_language/crates/baml_db/Cargo.toml +++ b/baml_language/crates/baml_db/Cargo.toml @@ -18,6 +18,7 @@ workspace = true [dependencies] salsa = { workspace = true } +rowan = { workspace = true } # All compiler crates baml_base = { workspace = true } diff --git a/baml_language/crates/baml_db/src/lib.rs b/baml_language/crates/baml_db/src/lib.rs index 4b4fcebd29..a4dfa62bb7 100644 --- a/baml_language/crates/baml_db/src/lib.rs +++ b/baml_language/crates/baml_db/src/lib.rs @@ -18,6 +18,7 @@ pub use baml_parser; pub use baml_syntax; pub use baml_thir; pub use baml_workspace; +use rowan::ast::AstNode; use salsa::Storage; /// Type alias for Salsa event callbacks @@ -35,6 +36,9 @@ pub struct RootDatabase { #[salsa::db] impl salsa::Database for RootDatabase {} +#[salsa::db] +impl baml_hir::Db for RootDatabase {} + impl RootDatabase { /// Create a new empty database. pub fn new() -> Self { @@ -80,3 +84,73 @@ impl Default for RootDatabase { Self::new() } } + +// +// ────────────────────────────────────────────────── FUNCTION QUERIES ───── +// + +/// Returns the signature of a function (params, return type, generics). +/// +/// This is separate from the `ItemTree` to provide fine-grained incrementality. +/// Changing a function body does NOT invalidate this query. +#[salsa::tracked] +pub fn function_signature<'db>( + db: &'db dyn baml_hir::Db, + file: SourceFile, + function: baml_hir::FunctionLoc<'db>, +) -> Arc { + let tree = baml_parser::syntax_tree(db, file); + let source_file = baml_syntax::ast::SourceFile::cast(tree).unwrap(); + + // Find the function node by name + let item_tree = baml_hir::file_item_tree(db, file); + let func = &item_tree[function.id(db)]; + + for item in source_file.items() { + if let baml_syntax::ast::Item::Function(func_node) = item { + if let Some(name_token) = func_node.name() { + if name_token.text() == func.name.as_str() { + return baml_hir::FunctionSignature::lower(&func_node); + } + } + } + } + + // Function not found - return minimal signature + Arc::new(baml_hir::FunctionSignature { + name: func.name.clone(), + params: vec![], + return_type: baml_hir::TypeRef::Unknown, + attrs: baml_hir::FunctionAttributes::default(), + }) +} + +/// Returns the body of a function (LLM prompt or expression IR). +/// +/// This is the most frequently invalidated query - it changes whenever +/// the function body is edited. +#[salsa::tracked] +pub fn function_body<'db>( + db: &'db dyn baml_hir::Db, + file: SourceFile, + function: baml_hir::FunctionLoc<'db>, +) -> Arc { + let tree = baml_parser::syntax_tree(db, file); + let source_file = baml_syntax::ast::SourceFile::cast(tree).unwrap(); + + let item_tree = baml_hir::file_item_tree(db, file); + let func = &item_tree[function.id(db)]; + + for item in source_file.items() { + if let baml_syntax::ast::Item::Function(func_node) = item { + if let Some(name_token) = func_node.name() { + if name_token.text() == func.name.as_str() { + return baml_hir::FunctionBody::lower(&func_node); + } + } + } + } + + // No body found + Arc::new(baml_hir::FunctionBody::Missing) +} diff --git a/baml_language/crates/baml_hir/Cargo.toml b/baml_language/crates/baml_hir/Cargo.toml index 51eb4fe4ba..3500feb81d 100644 --- a/baml_language/crates/baml_hir/Cargo.toml +++ b/baml_language/crates/baml_hir/Cargo.toml @@ -22,4 +22,7 @@ baml_parser = { workspace = true } baml_syntax = { workspace = true } baml_workspace = { workspace = true } +la-arena = { workspace = true } +rowan = { workspace = true } +rustc-hash = { workspace = true } salsa = { workspace = true } diff --git a/baml_language/crates/baml_hir/src/body.rs b/baml_language/crates/baml_hir/src/body.rs new file mode 100644 index 0000000000..b7761e208d --- /dev/null +++ b/baml_language/crates/baml_hir/src/body.rs @@ -0,0 +1,963 @@ +//! Function bodies - either LLM prompts or expression IR. +//! +//! The CST already distinguishes `LLM_FUNCTION_BODY` from `EXPR_FUNCTION_BODY`, +//! so we just need to lower each type appropriately. + +use crate::Name; +use la_arena::{Arena, Idx}; +use rowan::ast::AstNode; +use std::sync::Arc; + +/// The body of a function - determined by CST node type. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum FunctionBody { + /// LLM function: has `LLM_FUNCTION_BODY` in CST + Llm(LlmBody), + + /// Expression function: has `EXPR_FUNCTION_BODY` in CST + Expr(ExprBody), + + /// Function has no body (error recovery) + Missing, +} + +/// Body of an LLM function. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct LlmBody { + /// The client to use (e.g., "GPT4") + pub client: Option, + + /// The prompt template + pub prompt: Option, +} + +/// A prompt template with interpolations. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct PromptTemplate { + /// The raw prompt string (may contain {{ }} interpolations) + pub text: String, + + /// Parsed interpolation expressions + pub interpolations: Vec, +} + +/// A {{ var }} interpolation in a prompt. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Interpolation { + /// Variable name referenced + pub var_name: Name, + + /// Source offset in the prompt string + pub offset: u32, +} + +/// Body of an expression function (turing-complete). +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ExprBody { + /// Expression arena + pub exprs: Arena, + + /// Statement arena + pub stmts: Arena, + + /// Root expression of the function body (usually a `BLOCK_EXPR`) + pub root_expr: Option, +} + +// IDs for arena indices +pub type ExprId = Idx; +pub type StmtId = Idx; +pub type PatId = Idx; + +/// Expressions in BAML function bodies. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Expr { + /// Literal values + Literal(Literal), + + /// Variable/path reference (e.g., `x`, `GPT4`) + Path(Name), + + /// If expression + If { + condition: ExprId, + then_branch: ExprId, + else_branch: Option, + }, + + /// Match expression + Match { + scrutinee: ExprId, + arms: Vec, + }, + + /// Binary operation + Binary { + op: BinaryOp, + lhs: ExprId, + rhs: ExprId, + }, + + /// Unary operation + Unary { op: UnaryOp, expr: ExprId }, + + /// Function call: `call_f1()`, `transform(user)` + Call { callee: ExprId, args: Vec }, + + /// Object constructor: `Point { x: 1, y: 2 }` + Object { + type_name: Option, + fields: Vec<(Name, ExprId)>, + }, + + /// Array constructor: `[1, 2, 3]` + Array { elements: Vec }, + + /// Block expression: `{ stmt1; stmt2; expr }` + Block { + stmts: Vec, + tail_expr: Option, + }, + + /// Field access: `user.name`, `obj.field.nested` + FieldAccess { base: ExprId, field: Name }, + + /// Index access: `array[0]`, `map[key]` + Index { base: ExprId, index: ExprId }, + + /// Missing/error expression + Missing, +} + +/// Statements in BAML function bodies. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Stmt { + /// Expression statement: `call_f1();` + Expr(ExprId), + + /// Let binding: `let x = call_f3();` + Let { + pattern: PatId, + type_annotation: Option, + initializer: Option, + }, + + /// Return statement: `return "minor";` + Return(Option), + + /// Missing/error statement + Missing, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MatchArm { + pub pattern: PatId, + pub expr: ExprId, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Pattern { + /// Literal pattern: `42`, `"hello"` + Literal(Literal), + + /// Path pattern: `SomeVariant` + Path(Name), + + /// Binding pattern: `x`, `user` + Binding(Name), + + /// Wildcard: `_` + Wildcard, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Literal { + String(String), + Int(i64), + Float(String), + Bool(bool), + Null, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum BinaryOp { + // Arithmetic + Add, + Sub, + Mul, + Div, + Mod, + + // Comparison + Eq, + Ne, + Lt, + Le, + Gt, + Ge, + + // Logical + And, + Or, + + // Bitwise + BitAnd, + BitOr, + BitXor, + Shl, + Shr, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum UnaryOp { + Not, + Neg, +} + +impl FunctionBody { + /// Lower a function body from CST to HIR. + /// + /// The CST already tells us if it's LLM or Expr via node type! + pub fn lower(func_node: &baml_syntax::ast::FunctionDef) -> Arc { + // Check which body type we have + if let Some(llm_body) = func_node.llm_body() { + Arc::new(FunctionBody::Llm(Self::lower_llm_body(&llm_body))) + } else if let Some(expr_body) = func_node.expr_body() { + Arc::new(FunctionBody::Expr(Self::lower_expr_body(&expr_body))) + } else { + Arc::new(FunctionBody::Missing) + } + } + + fn lower_llm_body(llm_body: &baml_syntax::ast::LlmFunctionBody) -> LlmBody { + let mut client = None; + let mut prompt = None; + + // Extract client from CLIENT_FIELD + for child in llm_body.syntax().children() { + if child.kind() == baml_syntax::SyntaxKind::CLIENT_FIELD { + // CLIENT_FIELD has: KW_CLIENT "client" WORD "GPT4" + if let Some(client_name) = child + .children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .filter(|t| t.kind() == baml_syntax::SyntaxKind::WORD) + .nth(0) + { + client = Some(Name::new(client_name.text())); + } + } else if child.kind() == baml_syntax::SyntaxKind::PROMPT_FIELD { + // PROMPT_FIELD has: WORD "prompt" RAW_STRING_LITERAL (node, not token!) + // The RAW_STRING_LITERAL node contains the full text including delimiters + if let Some(prompt_node) = child + .children() + .find(|n| n.kind() == baml_syntax::SyntaxKind::RAW_STRING_LITERAL) + { + let text = prompt_node.text().to_string(); + prompt = Some(Self::parse_prompt(&text)); + } + } + } + + LlmBody { client, prompt } + } + + fn parse_prompt(prompt_text: &str) -> PromptTemplate { + // Strip #"..."# or "..." delimiters + let prompt_text = prompt_text.trim(); + let content = if prompt_text.starts_with("#\"") && prompt_text.ends_with("\"#") { + &prompt_text[2..prompt_text.len() - 2] + } else if prompt_text.starts_with('"') && prompt_text.ends_with('"') { + &prompt_text[1..prompt_text.len() - 1] + } else { + prompt_text + }; + + // Parse {{ var }} interpolations + let interpolations = Self::parse_interpolations(content); + + PromptTemplate { + text: content.to_string(), + interpolations, + } + } + + fn parse_interpolations(prompt: &str) -> Vec { + let mut interpolations = Vec::new(); + let mut offset = 0; + + while let Some(start) = prompt[offset..].find("{{") { + let abs_start = offset + start; + if let Some(end) = prompt[abs_start..].find("}}") { + let abs_end = abs_start + end; + let var_text = prompt[abs_start + 2..abs_end].trim(); + + #[allow(clippy::cast_possible_truncation)] + interpolations.push(Interpolation { + var_name: Name::new(var_text), + offset: abs_start as u32, // Prompt strings are unlikely to exceed 4GB + }); + + offset = abs_end + 2; + } else { + break; + } + } + + interpolations + } + + fn lower_expr_body(expr_body: &baml_syntax::ast::ExprFunctionBody) -> ExprBody { + let mut ctx = LoweringContext::new(); + + // The EXPR_FUNCTION_BODY contains a BLOCK_EXPR as its child + // which contains all the statements and expressions + let root_expr = expr_body + .syntax() + .children() + .find_map(baml_syntax::ast::BlockExpr::cast) + .map(|block| ctx.lower_block_expr(&block)); + + ExprBody { + exprs: ctx.exprs, + stmts: ctx.stmts, + root_expr, + } + } +} + +struct LoweringContext { + exprs: Arena, + stmts: Arena, + patterns: Arena, +} + +impl LoweringContext { + fn new() -> Self { + Self { + exprs: Arena::new(), + stmts: Arena::new(), + patterns: Arena::new(), + } + } + + fn lower_block_expr(&mut self, block: &baml_syntax::ast::BlockExpr) -> ExprId { + use baml_syntax::SyntaxKind; + use rowan::ast::AstNode; + + let mut stmts = Vec::new(); + let mut tail_expr = None; + + // Iterate through all children of the block + let children: Vec<_> = block.syntax().children().collect(); + + for (idx, child) in children.iter().enumerate() { + let is_last = idx == children.len() - 1; + + match child.kind() { + SyntaxKind::LET_STMT => { + let stmt_id = self.lower_let_stmt(child); + stmts.push(stmt_id); + } + SyntaxKind::RETURN_STMT => { + let stmt_id = self.lower_return_stmt(child); + stmts.push(stmt_id); + } + SyntaxKind::EXPR + | SyntaxKind::BINARY_EXPR + | SyntaxKind::UNARY_EXPR + | SyntaxKind::CALL_EXPR + | SyntaxKind::IF_EXPR + | SyntaxKind::BLOCK_EXPR + | SyntaxKind::PATH_EXPR + | SyntaxKind::FIELD_ACCESS_EXPR + | SyntaxKind::INDEX_EXPR + | SyntaxKind::PAREN_EXPR + | SyntaxKind::ARRAY_LITERAL + | SyntaxKind::OBJECT_LITERAL => { + let expr_id = self.lower_expr(child); + + // Check if this expression is followed by a semicolon + let has_semicolon = Self::has_trailing_semicolon(child); + + // Last expression without semicolon becomes tail expression + if is_last && !has_semicolon { + tail_expr = Some(expr_id); + } else { + // Expression statement (with semicolon or not last) + stmts.push(self.stmts.alloc(Stmt::Expr(expr_id))); + } + } + _ => { + // Skip other node types (comments, whitespace, etc.) + } + } + } + + self.exprs.alloc(Expr::Block { stmts, tail_expr }) + } + + fn lower_expr(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + use baml_syntax::SyntaxKind; + + match node.kind() { + SyntaxKind::BINARY_EXPR => self.lower_binary_expr(node), + SyntaxKind::UNARY_EXPR => self.lower_unary_expr(node), + SyntaxKind::CALL_EXPR => self.lower_call_expr(node), + SyntaxKind::IF_EXPR => self.lower_if_expr(node), + SyntaxKind::BLOCK_EXPR => { + if let Some(block) = baml_syntax::ast::BlockExpr::cast(node.clone()) { + self.lower_block_expr(&block) + } else { + self.exprs.alloc(Expr::Missing) + } + } + SyntaxKind::PATH_EXPR => self.lower_path_expr(node), + SyntaxKind::FIELD_ACCESS_EXPR => self.lower_field_access_expr(node), + SyntaxKind::INDEX_EXPR => self.lower_index_expr(node), + SyntaxKind::PAREN_EXPR => { + // Unwrap parentheses - just lower the inner expression + if let Some(inner) = node.children().next() { + self.lower_expr(&inner) + } else { + self.exprs.alloc(Expr::Missing) + } + } + SyntaxKind::STRING_LITERAL | SyntaxKind::RAW_STRING_LITERAL => { + self.lower_string_literal(node) + } + SyntaxKind::ARRAY_LITERAL => self.lower_array_literal(node), + SyntaxKind::OBJECT_LITERAL => self.lower_object_literal(node), + _ => { + // Check if this is a literal token + if let Some(literal) = self.try_lower_literal_token(node) { + literal + } else { + self.exprs.alloc(Expr::Missing) + } + } + } + } + + fn lower_binary_expr(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + use baml_syntax::SyntaxKind; + + // Binary expressions can have: child nodes (other exprs) OR direct tokens (literals/identifiers) + // We need to handle both cases + + let mut lhs = None; + let mut rhs = None; + let mut op = None; + + for elem in node.children_with_tokens() { + match elem { + rowan::NodeOrToken::Node(child_node) => { + // This is a child expression node (e.g., another BINARY_EXPR, PAREN_EXPR) + let expr_id = self.lower_expr(&child_node); + if lhs.is_none() { + lhs = Some(expr_id); + } else { + rhs = Some(expr_id); + } + } + rowan::NodeOrToken::Token(token) => { + match token.kind() { + // Operators + SyntaxKind::PLUS => op = Some(BinaryOp::Add), + SyntaxKind::MINUS => op = Some(BinaryOp::Sub), + SyntaxKind::STAR => op = Some(BinaryOp::Mul), + SyntaxKind::SLASH => op = Some(BinaryOp::Div), + SyntaxKind::PERCENT => op = Some(BinaryOp::Mod), + SyntaxKind::EQUALS_EQUALS => op = Some(BinaryOp::Eq), + SyntaxKind::NOT_EQUALS => op = Some(BinaryOp::Ne), + SyntaxKind::LESS => op = Some(BinaryOp::Lt), + SyntaxKind::LESS_EQUALS => op = Some(BinaryOp::Le), + SyntaxKind::GREATER => op = Some(BinaryOp::Gt), + SyntaxKind::GREATER_EQUALS => op = Some(BinaryOp::Ge), + SyntaxKind::AND_AND => op = Some(BinaryOp::And), + SyntaxKind::OR_OR => op = Some(BinaryOp::Or), + SyntaxKind::AND => op = Some(BinaryOp::BitAnd), + SyntaxKind::PIPE => op = Some(BinaryOp::BitOr), + SyntaxKind::CARET => op = Some(BinaryOp::BitXor), + SyntaxKind::LESS_LESS => op = Some(BinaryOp::Shl), + SyntaxKind::GREATER_GREATER => op = Some(BinaryOp::Shr), + + // Literals and identifiers - convert to expressions + SyntaxKind::INTEGER_LITERAL => { + let value = token.text().parse::().unwrap_or(0); + let expr_id = self.exprs.alloc(Expr::Literal(Literal::Int(value))); + if lhs.is_none() { + lhs = Some(expr_id); + } else { + rhs = Some(expr_id); + } + } + SyntaxKind::FLOAT_LITERAL => { + let expr_id = self + .exprs + .alloc(Expr::Literal(Literal::Float(token.text().to_string()))); + if lhs.is_none() { + lhs = Some(expr_id); + } else { + rhs = Some(expr_id); + } + } + SyntaxKind::WORD => { + let text = token.text(); + let expr_id = match text { + "true" => self.exprs.alloc(Expr::Literal(Literal::Bool(true))), + "false" => self.exprs.alloc(Expr::Literal(Literal::Bool(false))), + "null" => self.exprs.alloc(Expr::Literal(Literal::Null)), + _ => self.exprs.alloc(Expr::Path(Name::new(text))), + }; + if lhs.is_none() { + lhs = Some(expr_id); + } else { + rhs = Some(expr_id); + } + } + _ => {} + } + } + } + } + + let lhs = lhs.unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + let rhs = rhs.unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + let op = op.unwrap_or(BinaryOp::Add); + + self.exprs.alloc(Expr::Binary { op, lhs, rhs }) + } + + fn lower_unary_expr(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + use baml_syntax::SyntaxKind; + + // Find the operator + let op = node + .children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .find_map(|token| match token.kind() { + SyntaxKind::NOT => Some(UnaryOp::Not), + SyntaxKind::MINUS => Some(UnaryOp::Neg), + _ => None, + }) + .unwrap_or(UnaryOp::Not); // Default + + // Find the expression + let expr = node + .children() + .next() + .map(|n| self.lower_expr(&n)) + .unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + + self.exprs.alloc(Expr::Unary { op, expr }) + } + + fn lower_if_expr(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + // IF_EXPR structure: condition (EXPR), then_branch (BLOCK_EXPR), optional else_branch + let children: Vec<_> = node.children().collect(); + + let condition = children + .first() + .map(|n| self.lower_expr(n)) + .unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + + let then_branch = children + .get(1) + .map(|n| self.lower_expr(n)) + .unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + + // Check for else branch - it might be another IF_EXPR (else if) or BLOCK_EXPR (else) + let else_branch = if children.len() > 2 { + Some(self.lower_expr(&children[2])) + } else { + None + }; + + self.exprs.alloc(Expr::If { + condition, + then_branch, + else_branch, + }) + } + + fn lower_call_expr(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + use baml_syntax::SyntaxKind; + + // CALL_EXPR structure: callee (PATH_EXPR or other expr), CALL_ARGS + let mut children = node.children(); + + let callee = children + .next() + .map(|n| self.lower_expr(&n)) + .unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + + // Find CALL_ARGS node and extract arguments + let args = node + .children() + .find(|n| n.kind() == SyntaxKind::CALL_ARGS) + .map(|args_node| { + args_node + .children() + .filter(|n| { + matches!( + n.kind(), + SyntaxKind::EXPR + | SyntaxKind::BINARY_EXPR + | SyntaxKind::UNARY_EXPR + | SyntaxKind::CALL_EXPR + | SyntaxKind::PATH_EXPR + | SyntaxKind::FIELD_ACCESS_EXPR + | SyntaxKind::INDEX_EXPR + | SyntaxKind::IF_EXPR + | SyntaxKind::BLOCK_EXPR + | SyntaxKind::PAREN_EXPR + ) + }) + .map(|n| self.lower_expr(&n)) + .collect() + }) + .unwrap_or_default(); + + self.exprs.alloc(Expr::Call { callee, args }) + } + + fn lower_field_access_expr(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + use baml_syntax::SyntaxKind; + + // FIELD_ACCESS_EXPR structure: base expression, DOT token, field name (WORD) + // The parser wraps the left side as a child expression node + let base = node + .children() + .next() + .map(|n| self.lower_expr(&n)) + .unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + + // Find the field name (WORD token after DOT) + let field = node + .children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .filter(|token| token.kind() == SyntaxKind::WORD) + .last() // Get the last WORD (the field name, not part of the base expression) + .map(|token| Name::new(token.text())) + .unwrap_or_else(|| Name::new("")); + + self.exprs.alloc(Expr::FieldAccess { base, field }) + } + + fn lower_index_expr(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + use baml_syntax::SyntaxKind; + + // INDEX_EXPR structure: base (node or token), L_BRACKET, index (node or token), R_BRACKET + // Similar to BINARY_EXPR, the base and index can be either child nodes or direct tokens + + let mut base = None; + let mut index = None; + let mut inside_brackets = false; + + for elem in node.children_with_tokens() { + match elem { + rowan::NodeOrToken::Node(child_node) => { + // Child expression node + let expr_id = self.lower_expr(&child_node); + if !inside_brackets { + base = Some(expr_id); + } else { + index = Some(expr_id); + } + } + rowan::NodeOrToken::Token(token) => { + match token.kind() { + SyntaxKind::L_BRACKET => { + inside_brackets = true; + } + SyntaxKind::R_BRACKET => { + inside_brackets = false; + } + // Handle direct tokens (literals, identifiers) + SyntaxKind::INTEGER_LITERAL => { + let value = token.text().parse::().unwrap_or(0); + let expr_id = self.exprs.alloc(Expr::Literal(Literal::Int(value))); + if !inside_brackets { + base = Some(expr_id); + } else { + index = Some(expr_id); + } + } + SyntaxKind::FLOAT_LITERAL => { + let expr_id = self + .exprs + .alloc(Expr::Literal(Literal::Float(token.text().to_string()))); + if !inside_brackets { + base = Some(expr_id); + } else { + index = Some(expr_id); + } + } + SyntaxKind::WORD => { + let text = token.text(); + let expr_id = match text { + "true" => self.exprs.alloc(Expr::Literal(Literal::Bool(true))), + "false" => self.exprs.alloc(Expr::Literal(Literal::Bool(false))), + "null" => self.exprs.alloc(Expr::Literal(Literal::Null)), + _ => self.exprs.alloc(Expr::Path(Name::new(text))), + }; + if !inside_brackets { + base = Some(expr_id); + } else { + index = Some(expr_id); + } + } + _ => {} + } + } + } + } + + let base = base.unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + let index = index.unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + + self.exprs.alloc(Expr::Index { base, index }) + } + + fn lower_path_expr(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + use baml_syntax::SyntaxKind; + + // PATH_EXPR can be a simple identifier or a qualified path + // Collect all WORD tokens and join them + let path_parts: Vec = node + .children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .filter(|token| token.kind() == SyntaxKind::WORD) + .map(|token| token.text().to_string()) + .collect(); + + if path_parts.is_empty() { + self.exprs.alloc(Expr::Missing) + } else { + let path_text = path_parts.join("::"); + self.exprs.alloc(Expr::Path(Name::new(&path_text))) + } + } + + fn lower_string_literal(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + let text = node.text().to_string(); + + // Strip quotes + let content = if text.starts_with("#\"") && text.ends_with("\"#") { + &text[2..text.len() - 2] + } else if text.starts_with('"') && text.ends_with('"') { + &text[1..text.len() - 1] + } else { + &text + }; + + self.exprs + .alloc(Expr::Literal(Literal::String(content.to_string()))) + } + + fn lower_array_literal(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + let elements = node + .children() + .filter(|n| { + !matches!( + n.kind(), + baml_syntax::SyntaxKind::L_BRACKET | baml_syntax::SyntaxKind::R_BRACKET + ) + }) + .map(|n| self.lower_expr(&n)) + .collect(); + + self.exprs.alloc(Expr::Array { elements }) + } + + fn lower_object_literal(&mut self, node: &baml_syntax::SyntaxNode) -> ExprId { + use baml_syntax::SyntaxKind; + + // Extract type name if present (before the brace) + let type_name = node + .children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .find(|token| token.kind() == SyntaxKind::WORD) + .map(|token| Name::new(token.text())); + + // Extract fields from OBJECT_FIELD children + let fields = node + .children() + .filter(|n| n.kind() == SyntaxKind::OBJECT_FIELD) + .filter_map(|field_node| { + // OBJECT_FIELD has: WORD (field name), COLON, EXPR (value) + let field_name = field_node + .children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .find(|token| token.kind() == SyntaxKind::WORD) + .map(|token| Name::new(token.text()))?; + + let value = field_node + .children() + .next() + .map(|n| self.lower_expr(&n)) + .unwrap_or_else(|| self.exprs.alloc(Expr::Missing)); + + Some((field_name, value)) + }) + .collect(); + + self.exprs.alloc(Expr::Object { type_name, fields }) + } + + fn try_lower_literal_token(&mut self, node: &baml_syntax::SyntaxNode) -> Option { + use baml_syntax::SyntaxKind; + + // Check if this node contains a literal token + node.children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .find_map(|token| match token.kind() { + SyntaxKind::WORD => { + // Check if this is a boolean or null literal + let text = token.text(); + match text { + "true" => Some(self.exprs.alloc(Expr::Literal(Literal::Bool(true)))), + "false" => Some(self.exprs.alloc(Expr::Literal(Literal::Bool(false)))), + "null" => Some(self.exprs.alloc(Expr::Literal(Literal::Null))), + _ => None, + } + } + SyntaxKind::INTEGER_LITERAL => { + let text = token.text(); + let value = text.parse::().unwrap_or(0); + Some(self.exprs.alloc(Expr::Literal(Literal::Int(value)))) + } + SyntaxKind::FLOAT_LITERAL => { + let text = token.text(); + Some( + self.exprs + .alloc(Expr::Literal(Literal::Float(text.to_string()))), + ) + } + _ => None, + }) + } + + fn lower_let_stmt(&mut self, node: &baml_syntax::SyntaxNode) -> StmtId { + use baml_syntax::SyntaxKind; + + // LET_STMT structure: let, pattern (WORD), =, initializer (EXPR) + + // Extract pattern (for now, just a simple binding) + let pattern = node + .children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .find(|token| token.kind() == SyntaxKind::WORD) + .map(|token| { + let name = Name::new(token.text()); + self.patterns.alloc(Pattern::Binding(name)) + }) + .unwrap_or_else(|| self.patterns.alloc(Pattern::Wildcard)); + + // Extract initializer expression + let initializer = node + .children() + .find(|n| { + matches!( + n.kind(), + SyntaxKind::EXPR + | SyntaxKind::BINARY_EXPR + | SyntaxKind::UNARY_EXPR + | SyntaxKind::CALL_EXPR + | SyntaxKind::PATH_EXPR + | SyntaxKind::FIELD_ACCESS_EXPR + | SyntaxKind::INDEX_EXPR + | SyntaxKind::IF_EXPR + | SyntaxKind::BLOCK_EXPR + | SyntaxKind::PAREN_EXPR + | SyntaxKind::ARRAY_LITERAL + | SyntaxKind::OBJECT_LITERAL + ) + }) + .map(|n| self.lower_expr(&n)); + + self.stmts.alloc(Stmt::Let { + pattern, + type_annotation: None, // TODO: Extract type annotation if present + initializer, + }) + } + + fn lower_return_stmt(&mut self, node: &baml_syntax::SyntaxNode) -> StmtId { + use baml_syntax::SyntaxKind; + + // RETURN_STMT structure: return keyword, optional expression (which might be a node or a direct token) + let return_value = if let Some(child_node) = node.children().find(|n| { + matches!( + n.kind(), + SyntaxKind::EXPR + | SyntaxKind::BINARY_EXPR + | SyntaxKind::UNARY_EXPR + | SyntaxKind::CALL_EXPR + | SyntaxKind::PATH_EXPR + | SyntaxKind::FIELD_ACCESS_EXPR + | SyntaxKind::INDEX_EXPR + | SyntaxKind::IF_EXPR + | SyntaxKind::BLOCK_EXPR + | SyntaxKind::PAREN_EXPR + | SyntaxKind::STRING_LITERAL + | SyntaxKind::RAW_STRING_LITERAL + ) + }) { + Some(self.lower_expr(&child_node)) + } else { + // Check for direct tokens (literals, identifiers) + node.children_with_tokens() + .filter_map(baml_syntax::NodeOrToken::into_token) + .find_map(|token| match token.kind() { + SyntaxKind::INTEGER_LITERAL => { + let value = token.text().parse::().unwrap_or(0); + Some(self.exprs.alloc(Expr::Literal(Literal::Int(value)))) + } + SyntaxKind::FLOAT_LITERAL => Some( + self.exprs + .alloc(Expr::Literal(Literal::Float(token.text().to_string()))), + ), + SyntaxKind::WORD => { + let text = token.text(); + let expr_id = match text { + "true" => self.exprs.alloc(Expr::Literal(Literal::Bool(true))), + "false" => self.exprs.alloc(Expr::Literal(Literal::Bool(false))), + "null" => self.exprs.alloc(Expr::Literal(Literal::Null)), + _ => self.exprs.alloc(Expr::Path(Name::new(text))), + }; + Some(expr_id) + } + SyntaxKind::STRING_LITERAL | SyntaxKind::RAW_STRING_LITERAL => { + let text = token.text(); + // Strip quotes + let content = if text.starts_with("#\"") && text.ends_with("\"#") { + &text[2..text.len() - 2] + } else if text.starts_with('"') && text.ends_with('"') { + &text[1..text.len() - 1] + } else { + text + }; + Some( + self.exprs + .alloc(Expr::Literal(Literal::String(content.to_string()))), + ) + } + _ => None, + }) + }; + + self.stmts.alloc(Stmt::Return(return_value)) + } + + fn has_trailing_semicolon(node: &baml_syntax::SyntaxNode) -> bool { + use baml_syntax::SyntaxKind; + use rowan::Direction; + + // Check if the next sibling token is a semicolon + node.siblings_with_tokens(Direction::Next) + .skip(1) // Skip the node itself + .filter_map(baml_syntax::NodeOrToken::into_token) + .any(|token| token.kind() == SyntaxKind::SEMICOLON) + } +} diff --git a/baml_language/crates/baml_hir/src/container.rs b/baml_language/crates/baml_hir/src/container.rs new file mode 100644 index 0000000000..17a88eabf4 --- /dev/null +++ b/baml_language/crates/baml_hir/src/container.rs @@ -0,0 +1,92 @@ +//! Container abstraction for item locations. +//! +//! A container represents where an item is defined: +//! - Currently: Always a file +//! - Future: Could be a module or block scope +//! +//! This abstraction future-proofs the design for modules without requiring +//! breaking changes when they're added. + +use baml_base::FileId; + +/// Container that holds items. +/// +/// This abstraction allows items to be located in: +/// - Files (current implementation) +/// - Modules (future feature) +/// - Block scopes (future feature) +/// +/// Note: Cannot be Copy because of `Box`. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ContainerId { + /// Item defined directly in a file (current behavior). + File(FileId), + + /// Item defined in a module (future feature). + /// Currently unused, but costs nothing to have. + #[allow(dead_code)] + Module(ModuleId), + + /// Item defined in a block expression (future feature). + /// For block-scoped definitions. + /// Boxed to break the recursion cycle. + #[allow(dead_code)] + Block(Box), +} + +impl ContainerId { + /// Constructor for current file-based system. + pub const fn file(file: FileId) -> Self { + ContainerId::File(file) + } + + /// Get the file this container belongs to (if known). + pub fn file_id(self) -> Option { + match self { + ContainerId::File(f) => Some(f), + // Future: Walk up module tree to find file + _ => None, + } + } +} + +/// Module identifier (future feature). +/// +/// Even though we don't use modules yet, defining this now costs nothing +/// and makes the future transition trivial. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct ModuleId { + /// The project this module belongs to. + pub project: ProjectId, + + /// The module's index within its `DefMap`. + pub local_id: LocalModuleId, +} + +impl ModuleId { + /// The root module (equivalent to current "global scope"). + pub const ROOT: ModuleId = ModuleId { + project: ProjectId(0), + local_id: LocalModuleId(0), + }; +} + +/// Local module ID within a project. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct LocalModuleId(pub u32); + +/// Project identifier (future feature for multi-crate support). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct ProjectId(pub u32); + +/// Block scope identifier (future feature). +/// +/// Note: Cannot be Copy because `ContainerId` contains `Box`. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct BlockId { + /// The function or item containing this block. + pub parent: ContainerId, + + /// Local ID within the parent. + pub local_id: u32, +} diff --git a/baml_language/crates/baml_hir/src/generics.rs b/baml_language/crates/baml_hir/src/generics.rs new file mode 100644 index 0000000000..0a047a723c --- /dev/null +++ b/baml_language/crates/baml_hir/src/generics.rs @@ -0,0 +1,55 @@ +//! Generic parameters for functions and types. +//! +//! Following rust-analyzer's pattern, generic parameters are queried separately +//! from the `ItemTree` to maintain the invalidation barrier. Changes to generic +//! parameters don't invalidate the `ItemTree`. + +use baml_base::Name; +use la_arena::{Arena, Idx}; + +/// Type parameter in a generic definition. +/// +/// Example: `T` in `class Foo` +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct TypeParam { + pub name: Name, + // Future: bounds, defaults, constraints +} + +/// Local index for a type parameter within its `GenericParams`. +pub type LocalTypeParamId = Idx; + +/// Generic parameters for an item (function, class, enum, etc.). +/// +/// This is queried separately from the `ItemTree` for incrementality. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct GenericParams { + /// Type parameters arena. + pub type_params: Arena, + // Future: const parameters, lifetime parameters, where clauses +} + +impl GenericParams { + /// Create empty generic parameters. + pub fn new() -> Self { + Self::default() + } + + /// Check if there are any generic parameters. + pub fn is_empty(&self) -> bool { + self.type_params.is_empty() + } + + /// Get all type parameter names. + pub fn type_param_names(&self) -> impl Iterator { + self.type_params.iter().map(|(_, p)| &p.name) + } +} + +impl std::ops::Index for GenericParams { + type Output = TypeParam; + + fn index(&self, index: LocalTypeParamId) -> &Self::Output { + &self.type_params[index] + } +} diff --git a/baml_language/crates/baml_hir/src/ids.rs b/baml_language/crates/baml_hir/src/ids.rs index 4de018acde..f55ee8c8b2 100644 --- a/baml_language/crates/baml_hir/src/ids.rs +++ b/baml_language/crates/baml_hir/src/ids.rs @@ -1,32 +1,169 @@ -//! HIR item identifiers. +//! HIR item identifiers with Salsa interning. +//! +//! This module defines stable IDs for all top-level items in BAML. +//! IDs are interned via Salsa, providing: +//! - Stability across edits (content-based, not order-based) +//! - Compactness (u32 instead of full location data) +//! - Efficient comparison and hashing -use baml_base::{FileId, Name}; +use std::marker::PhantomData; -/// A function in the HIR. -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct FunctionId { - pub file: FileId, - pub name: Name, +// Note: In Salsa 2022, interned types are their own IDs. +// The #[salsa::interned] macro in loc.rs creates these types directly. +// We re-export them here as type aliases for clarity. + +/// Identifier for a function (LLM or expression). +/// This is the interned `FunctionLoc` from loc.rs. +pub use crate::loc::FunctionLoc as FunctionId; + +/// Identifier for a class definition. +pub use crate::loc::ClassLoc as ClassId; + +/// Identifier for an enum definition. +pub use crate::loc::EnumLoc as EnumId; + +/// Identifier for a type alias. +pub use crate::loc::TypeAliasLoc as TypeAliasId; + +/// Identifier for a client configuration. +pub use crate::loc::ClientLoc as ClientId; + +/// Identifier for a test definition. +pub use crate::loc::TestLoc as TestId; + +// Manual Debug implementations for Salsa interned types +// These types don't auto-derive Debug, so we provide simple implementations + +impl std::fmt::Debug for FunctionId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "FunctionId(..)") + } +} + +impl std::fmt::Debug for ClassId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "ClassId(..)") + } +} + +impl std::fmt::Debug for EnumId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "EnumId(..)") + } +} + +impl std::fmt::Debug for TypeAliasId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "TypeAliasId(..)") + } +} + +impl std::fmt::Debug for ClientId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "ClientId(..)") + } } -/// A class in the HIR. -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ClassId { - pub file: FileId, - pub name: Name, +impl std::fmt::Debug for TestId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "TestId(..)") + } +} + +/// Union type for any top-level item. +/// +/// Note: Salsa interned types have a `'db` lifetime, so `ItemId` must also have one. +#[derive(Clone, Copy, PartialEq, Eq, Hash, salsa::Update)] +pub enum ItemId<'db> { + Function(FunctionId<'db>), + Class(ClassId<'db>), + Enum(EnumId<'db>), + TypeAlias(TypeAliasId<'db>), + Client(ClientId<'db>), + Test(TestId<'db>), +} + +// Manual Debug impl since Salsa interned types don't auto-derive Debug +impl std::fmt::Debug for ItemId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + ItemId::Function(_) => write!(f, "Function(_)"), + ItemId::Class(_) => write!(f, "Class(_)"), + ItemId::Enum(_) => write!(f, "Enum(_)"), + ItemId::TypeAlias(_) => write!(f, "TypeAlias(_)"), + ItemId::Client(_) => write!(f, "Client(_)"), + ItemId::Test(_) => write!(f, "Test(_)"), + } + } +} + +/// Local ID within an arena (type-safe index). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct LocalItemId { + index: u32, + _phantom: PhantomData, +} + +impl LocalItemId { + pub const fn new(index: u32) -> Self { + LocalItemId { + index, + _phantom: PhantomData, + } + } + + /// Create a `LocalItemId` from a name (content-based, not position-based). + /// This provides position-independence: the same name always produces the same ID. + pub fn from_name(name: &baml_base::Name) -> Self { + use std::collections::hash_map::DefaultHasher; + use std::hash::{Hash, Hasher}; + + let mut hasher = DefaultHasher::new(); + name.hash(&mut hasher); + let hash = hasher.finish(); + + // Use the lower 32 bits of the hash (truncation is intentional) + #[allow(clippy::cast_possible_truncation)] + let index = hash as u32; + + LocalItemId { + index, + _phantom: PhantomData, + } + } + + /// Convert from an la-arena Idx to `LocalItemId`. + pub fn from_arena(idx: la_arena::Idx) -> Self { + LocalItemId { + index: idx.into_raw().into_u32(), + _phantom: PhantomData, + } + } + + /// Convert to an la-arena Idx. + pub fn to_arena(self) -> la_arena::Idx { + la_arena::Idx::from_raw(la_arena::RawIdx::from_u32(self.index)) + } + + pub const fn as_u32(self) -> u32 { + self.index + } + + pub const fn as_usize(self) -> usize { + self.index as usize + } } -/// An enum in the HIR. -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct EnumId { - pub file: FileId, - pub name: Name, +// Implement From for convenience +impl From for LocalItemId { + fn from(index: u32) -> Self { + LocalItemId::new(index) + } } -/// Any top-level item. -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub enum ItemId { - Function(FunctionId), - Class(ClassId), - Enum(EnumId), +impl From for LocalItemId { + #[allow(clippy::cast_possible_truncation)] + fn from(index: usize) -> Self { + LocalItemId::new(index as u32) + } } diff --git a/baml_language/crates/baml_hir/src/item_tree.rs b/baml_language/crates/baml_hir/src/item_tree.rs new file mode 100644 index 0000000000..184ffcf186 --- /dev/null +++ b/baml_language/crates/baml_hir/src/item_tree.rs @@ -0,0 +1,243 @@ +//! Position-independent item storage. +//! +//! The `ItemTree` contains minimal representations of all items in a container. +//! It acts as an "invalidation barrier" - only changes to item signatures +//! cause the `ItemTree` to change, not edits to whitespace, comments, or bodies. + +use crate::{ + ids::LocalItemId, + loc::{ClassMarker, ClientMarker, EnumMarker, FunctionMarker, TestMarker, TypeAliasMarker}, + type_ref::TypeRef, +}; +use baml_base::Name; +use rustc_hash::FxHashMap; +use std::ops::Index; + +/// Position-independent item storage for a container. +/// +/// This is the core HIR data structure. Items are stored in hash maps +/// keyed by name-based IDs, following rust-analyzer's architecture. +/// +/// **Key property:** Items are indexed by name, not source position. +/// Adding an item in the middle of the file doesn't change the `LocalItemIds` +/// of other items because `LocalItemIds` are derived from names. +/// +/// Unlike the previous arena-based approach, items are stored directly in +/// `FxHashMap`, eliminating an extra level of indirection. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ItemTree { + pub(crate) functions: FxHashMap, Function>, + pub(crate) classes: FxHashMap, Class>, + pub(crate) enums: FxHashMap, Enum>, + pub(crate) type_aliases: FxHashMap, TypeAlias>, + pub(crate) clients: FxHashMap, Client>, + pub(crate) tests: FxHashMap, Test>, +} + +impl Default for ItemTree { + fn default() -> Self { + Self::new() + } +} + +impl ItemTree { + /// Create a new empty `ItemTree`. + pub fn new() -> Self { + Self { + functions: FxHashMap::default(), + classes: FxHashMap::default(), + enums: FxHashMap::default(), + type_aliases: FxHashMap::default(), + clients: FxHashMap::default(), + tests: FxHashMap::default(), + } + } + + /// Add a function and return its local ID. + /// `LocalItemId` is derived from the function's name for position-independence. + pub fn alloc_function(&mut self, func: Function) -> LocalItemId { + let id = LocalItemId::from_name(&func.name); + self.functions.insert(id, func); + id + } + + /// Add a class and return its local ID. + /// `LocalItemId` is derived from the class's name for position-independence. + pub fn alloc_class(&mut self, class: Class) -> LocalItemId { + let id = LocalItemId::from_name(&class.name); + self.classes.insert(id, class); + id + } + + /// Add an enum and return its local ID. + /// `LocalItemId` is derived from the enum's name for position-independence. + pub fn alloc_enum(&mut self, enum_def: Enum) -> LocalItemId { + let id = LocalItemId::from_name(&enum_def.name); + self.enums.insert(id, enum_def); + id + } + + /// Add a type alias and return its local ID. + /// `LocalItemId` is derived from the type alias's name for position-independence. + /// If there's a name collision, appends a counter to make it unique. + pub fn alloc_type_alias(&mut self, mut alias: TypeAlias) -> LocalItemId { + let mut id = LocalItemId::from_name(&alias.name); + + // Handle name collisions by appending counter + let mut counter = 0; + while self.type_aliases.contains_key(&id) { + counter += 1; + let collision_name = Name::new(format!("{}_{}", alias.name.as_str(), counter)); + id = LocalItemId::from_name(&collision_name); + alias.name = collision_name; + } + + self.type_aliases.insert(id, alias); + id + } + + /// Add a client and return its local ID. + /// `LocalItemId` is derived from the client's name for position-independence. + pub fn alloc_client(&mut self, client: Client) -> LocalItemId { + let id = LocalItemId::from_name(&client.name); + self.clients.insert(id, client); + id + } + + /// Add a test and return its local ID. + /// `LocalItemId` is derived from the test's name for position-independence. + pub fn alloc_test(&mut self, test: Test) -> LocalItemId { + let id = LocalItemId::from_name(&test.name); + self.tests.insert(id, test); + id + } + + // Note: Use the Index implementations for lookups. + // Example: let func = &item_tree[func_id]; +} + +/// A function definition in the `ItemTree`. +/// +/// This is the MINIMAL representation - ONLY the name. +/// Everything else (params, return type, body) is in separate queries for incrementality. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Function { + pub name: Name, +} + +/// A class definition. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Class { + pub name: Name, + pub fields: Vec, + + /// Block attributes (@@dynamic, @@alias, etc.). + pub is_dynamic: bool, + // Note: Generic parameters are queried separately via generic_params() + // for incrementality - changes to generics don't invalidate ItemTree +} + +/// Class field. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Field { + pub name: Name, + pub type_ref: TypeRef, +} + +/// An enum definition. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Enum { + pub name: Name, + pub variants: Vec, + // Note: Generic parameters are queried separately via generic_params() +} + +/// Enum variant. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct EnumVariant { + pub name: Name, +} + +/// Type alias definition. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TypeAlias { + pub name: Name, + pub type_ref: TypeRef, + // Note: Generic parameters are queried separately via generic_params() +} + +/// Client configuration. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Client { + pub name: Name, + pub provider: Name, +} + +/// Test definition. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Test { + pub name: Name, + + /// Unresolved function references. + pub function_refs: Vec, +} + +// +// ──────────────────────────────────────────────────────── INDEX IMPLS ───── +// + +/// Index `ItemTree` by `FunctionMarker` to get Function data. +impl Index> for ItemTree { + type Output = Function; + fn index(&self, index: LocalItemId) -> &Self::Output { + self.functions + .get(&index) + .expect("Function not found in ItemTree") + } +} + +/// Index `ItemTree` by `ClassMarker` to get Class data. +impl Index> for ItemTree { + type Output = Class; + fn index(&self, index: LocalItemId) -> &Self::Output { + self.classes + .get(&index) + .expect("Class not found in ItemTree") + } +} + +/// Index `ItemTree` by `EnumMarker` to get Enum data. +impl Index> for ItemTree { + type Output = Enum; + fn index(&self, index: LocalItemId) -> &Self::Output { + self.enums.get(&index).expect("Enum not found in ItemTree") + } +} + +/// Index `ItemTree` by `TypeAliasMarker` to get `TypeAlias` data. +impl Index> for ItemTree { + type Output = TypeAlias; + fn index(&self, index: LocalItemId) -> &Self::Output { + self.type_aliases + .get(&index) + .expect("TypeAlias not found in ItemTree") + } +} + +/// Index `ItemTree` by `ClientMarker` to get Client data. +impl Index> for ItemTree { + type Output = Client; + fn index(&self, index: LocalItemId) -> &Self::Output { + self.clients + .get(&index) + .expect("Client not found in ItemTree") + } +} + +/// Index `ItemTree` by `TestMarker` to get Test data. +impl Index> for ItemTree { + type Output = Test; + fn index(&self, index: LocalItemId) -> &Self::Output { + self.tests.get(&index).expect("Test not found in ItemTree") + } +} diff --git a/baml_language/crates/baml_hir/src/lib.rs b/baml_language/crates/baml_hir/src/lib.rs index d9ee73e5c8..53f3072ed4 100644 --- a/baml_language/crates/baml_hir/src/lib.rs +++ b/baml_language/crates/baml_hir/src/lib.rs @@ -1,85 +1,506 @@ //! High-level Intermediate Representation. //! //! Provides name resolution and semantic analysis after parsing. +//! +//! ## Architecture +//! +//! The HIR is built in layers: +//! 1. **`ItemTree`**: Position-independent item storage (signatures only) +//! 2. **Interning**: Locations → Stable IDs via Salsa +//! 3. **Name Resolution**: Paths → Item IDs (future) +//! +//! ## Key Design Choices +//! +//! - **Salsa-based incrementality**: Only recompute what changed +//! - **Stable IDs**: Content-based interning survives edits +//! - **Future-proof**: Ready for modules and generics + +use std::sync::Arc; use baml_base::{Name, SourceFile}; use baml_parser::syntax_tree; -use baml_workspace::project_files; +use baml_syntax::SyntaxNode; +use rowan::ast::AstNode; +// Module declarations +mod body; +mod container; +mod generics; mod ids; -mod types; +mod item_tree; +mod loc; +mod path; +mod signature; +mod type_ref; +// Re-exports +pub use body::*; +pub use container::{BlockId, ContainerId, LocalModuleId, ModuleId, ProjectId}; +pub use generics::*; pub use ids::*; -pub use types::*; +pub use item_tree::*; +pub use loc::*; +pub use path::*; +// Re-export signature types explicitly (no wildcards to avoid conflicts) +pub use signature::{CustomAttribute, FunctionAttributes, FunctionSignature, Param}; +pub use type_ref::*; + +// +// ──────────────────────────────────────────────────────────── DATABASE ───── +// + +/// Database trait for HIR queries. +/// +/// This trait is implemented by the root database and provides access +/// to all HIR-related Salsa queries and interned types. +/// +/// For now, this just extends `salsa::Database`. In the future, we can add +/// dependencies on other crate Db traits when they're implemented. +#[salsa::db] +pub trait Db: salsa::Database {} + +// +// ───────────────────────────────────────────────────── TRACKED STRUCTS ───── +// + +/// Tracked struct holding all items defined in a file. +/// +/// This follows the Salsa 2022 pattern: instead of returning Vec> +/// directly from a tracked function, we wrap it in a tracked struct with +/// #[returns(ref)] to avoid lifetime issues. +#[salsa::tracked] +pub struct FileItems<'db> { + #[tracked] + #[returns(ref)] + pub items: Vec>, +} -/// Tracked: get all items defined in a file +/// Tracked struct holding all items in a project. #[salsa::tracked] -pub fn file_items(db: &dyn salsa::Database, file: SourceFile) -> Vec { - // TODO: Extract items from syntax tree - let _tree = syntax_tree(db, file); - vec![] +pub struct ProjectItems<'db> { + #[tracked] + #[returns(ref)] + pub items: Vec>, } -/// Tracked: get all items in the entire project +// +// ────────────────────────────────────────────────────────── SALSA QUERIES ───── +// + +/// Tracked: Extract `ItemTree` from a file's syntax tree. +/// +/// This query is the "invalidation barrier" - it only changes when +/// item signatures change, not when whitespace/comments/bodies change. #[salsa::tracked] -pub fn project_items(db: &dyn salsa::Database, root: baml_workspace::ProjectRoot) -> Vec { - let files = project_files(db, root); +pub fn file_item_tree(db: &dyn Db, file: SourceFile) -> Arc { + let tree = syntax_tree(db, file); + let item_tree = lower_file(&tree); + Arc::new(item_tree) +} + +// Future: When we add modules, we'll need a function like this: +// #[salsa::tracked] +// pub fn container_item_tree(db: &dyn Db, container: ContainerId) -> Arc + +/// Tracked: Get all items defined in a file. +/// +/// Returns a tracked struct containing interned IDs for all top-level items. +#[salsa::tracked] +pub fn file_items(db: &dyn Db, file: SourceFile) -> FileItems<'_> { + let item_tree = file_item_tree(db, file); + let file_id = file.file_id(db); + let items = intern_all_items(db, file_id, &item_tree); + FileItems::new(db, items) +} + +/// Tracked: Get all items in the entire project. +#[salsa::tracked] +pub fn project_items(db: &dyn Db, root: baml_workspace::ProjectRoot) -> ProjectItems<'_> { + let files = baml_workspace::project_files(db, root); let mut all_items = Vec::new(); for file in files { - let items = file_items(db, file); - all_items.extend(items); + let items_struct = file_items(db, file); + all_items.extend(items_struct.items(db).iter().copied()); } - all_items + ProjectItems::new(db, all_items) } -/// Tracked: resolve a name to an item +/// Tracked: Get generic parameters for a function. +/// +/// This is queried separately from `ItemTree` for incrementality - changes to +/// generic parameters don't invalidate the `ItemTree`. +/// +/// For now, this returns empty generic parameters since BAML doesn't currently +/// parse generic syntax. Future work will extract `` from the CST. #[salsa::tracked] -pub fn resolve_name(db: &dyn salsa::Database, from: SourceFile, _name: Name) -> Option { - // TODO: Implement name resolution - // For now, just check items in the current file - let _items = file_items(db, from); +pub fn function_generic_params(_db: &dyn Db, _func: FunctionId<'_>) -> Arc { + // TODO: Extract generic parameters from CST when BAML adds generic syntax + Arc::new(GenericParams::new()) +} - // This is a stub - real implementation would check item names - None +/// Tracked: Get generic parameters for a class. +#[salsa::tracked] +pub fn class_generic_params(_db: &dyn Db, _class: ClassId<'_>) -> Arc { + // TODO: Extract generic parameters from CST when BAML adds generic syntax + Arc::new(GenericParams::new()) } -/// Tracked struct for function definitions +/// Tracked: Get generic parameters for an enum. #[salsa::tracked] -pub struct FunctionDef<'db> { - pub name: Name, +pub fn enum_generic_params(_db: &dyn Db, _enum: EnumId<'_>) -> Arc { + // TODO: Extract generic parameters from CST when BAML adds generic syntax + Arc::new(GenericParams::new()) +} - #[returns(ref)] - pub params: Vec, +/// Tracked: Get generic parameters for a type alias. +#[salsa::tracked] +pub fn type_alias_generic_params(_db: &dyn Db, _alias: TypeAliasId<'_>) -> Arc { + // TODO: Extract generic parameters from CST when BAML adds generic syntax + Arc::new(GenericParams::new()) +} + +// +// ──────────────────────────────────────────────────────── INTERN HELPERS ───── +// + +/// Intern all items from an `ItemTree` and return their IDs. +/// +/// Uses name-based `LocalItemIds` for position-independence. +/// Items are returned sorted by their ID value for deterministic ordering. +fn intern_all_items<'db>( + db: &'db dyn Db, + file: baml_base::FileId, + tree: &ItemTree, +) -> Vec> { + let mut items = Vec::new(); + + // Intern functions - sort by ID for deterministic order + let mut funcs: Vec<_> = tree.functions.keys().copied().collect(); + funcs.sort_by_key(|id| id.as_u32()); + for local_id in funcs { + let loc = FunctionLoc::new(db, file, local_id); + items.push(ItemId::Function(loc)); + } + + // Intern classes + let mut classes: Vec<_> = tree.classes.keys().copied().collect(); + classes.sort_by_key(|id| id.as_u32()); + for local_id in classes { + let loc = ClassLoc::new(db, file, local_id); + items.push(ItemId::Class(loc)); + } - pub return_type: TypeRef, + // Intern enums + let mut enums: Vec<_> = tree.enums.keys().copied().collect(); + enums.sort_by_key(|id| id.as_u32()); + for local_id in enums { + let loc = EnumLoc::new(db, file, local_id); + items.push(ItemId::Enum(loc)); + } + + // Intern type aliases + let mut aliases: Vec<_> = tree.type_aliases.keys().copied().collect(); + aliases.sort_by_key(|id| id.as_u32()); + for local_id in aliases { + let loc = TypeAliasLoc::new(db, file, local_id); + items.push(ItemId::TypeAlias(loc)); + } + + // Intern clients + let mut clients: Vec<_> = tree.clients.keys().copied().collect(); + clients.sort_by_key(|id| id.as_u32()); + for local_id in clients { + let loc = ClientLoc::new(db, file, local_id); + items.push(ItemId::Client(loc)); + } + + // Intern tests + let mut tests: Vec<_> = tree.tests.keys().copied().collect(); + tests.sort_by_key(|id| id.as_u32()); + for local_id in tests { + let loc = TestLoc::new(db, file, local_id); + items.push(ItemId::Test(loc)); + } + + items } -/// Tracked struct for class definitions -#[salsa::tracked] -pub struct ClassDef<'db> { - pub name: Name, +// +// ──────────────────────────────────────────────────────── ITEM LOOKUP ───── +// - #[returns(ref)] - pub fields: Vec, +// Note: With the Index implementations on ItemTree, you can now use: +// let item_tree = file_item_tree(db, source_file); +// let func = &item_tree[func_id.id(db)]; +// +// The old lookup helper functions are removed in favor of direct indexing. + +// +// ──────────────────────────────────────────────────── CST → HIR LOWERING ───── +// + +/// Lower a syntax tree into an `ItemTree`. +/// +/// This is the main extraction logic that walks the CST and builds +/// position-independent item representations. +fn lower_file(root: &SyntaxNode) -> ItemTree { + let mut tree = ItemTree::new(); + + // Walk only direct children of the root (top-level items) + // Don't use descendants() because that would pick up nested items like + // CLIENT_DEF nodes inside function bodies + for child in root.children() { + lower_item(&mut tree, &child); + } + + tree } -/// Helper to get function data (for compatibility) -pub fn function_data(_db: &dyn salsa::Database, _func: FunctionId) -> FunctionData { - // TODO: Convert from tracked struct to data - FunctionData { - name: Name::new("stub"), - params: vec![], - return_type: TypeRef::Unknown, +/// Lower a single item from the CST. +fn lower_item(tree: &mut ItemTree, node: &SyntaxNode) { + use baml_syntax::SyntaxKind; + + match node.kind() { + SyntaxKind::CLASS_DEF => { + if let Some(class) = lower_class(node) { + tree.alloc_class(class); + } + } + SyntaxKind::ENUM_DEF => { + if let Some(enum_def) = lower_enum(node) { + tree.alloc_enum(enum_def); + } + } + SyntaxKind::FUNCTION_DEF => { + if let Some(func) = lower_function(node) { + tree.alloc_function(func); + } + } + SyntaxKind::TYPE_ALIAS_DEF => { + if let Some(alias) = lower_type_alias(node) { + tree.alloc_type_alias(alias); + } + } + SyntaxKind::CLIENT_DEF => { + if let Some(client) = lower_client(node) { + tree.alloc_client(client); + } + } + SyntaxKind::TEST_DEF => { + if let Some(test) = lower_test(node) { + tree.alloc_test(test); + } + } + _ => { + // Skip other nodes (whitespace, comments, etc.) + } + } +} + +/// Extract class definition from CST. +fn lower_class(node: &SyntaxNode) -> Option { + use baml_syntax::ast::ClassDef; + + let class = ClassDef::cast(node.clone())?; + let name = class.name()?.text().into(); + let mut fields = Vec::new(); + + // Extract fields + for field_node in class.fields() { + if let Some(field_name) = field_node.name() { + let type_ref = field_node + .ty() + .map(|t| lower_type_ref(&t)) + .unwrap_or(TypeRef::Unknown); + + fields.push(crate::Field { + name: field_name.text().into(), + type_ref, + }); + } } + + // Check for @@dynamic attribute + let is_dynamic = class + .block_attributes() + .any(|attr| attr.syntax().text().to_string().contains("dynamic")); + + Some(Class { + name, + fields, + is_dynamic, + }) } -/// Helper to get class data (for compatibility) -pub fn class_data(_db: &dyn salsa::Database, _class: ClassId) -> ClassData { - // TODO: Convert from tracked struct to data - ClassData { - name: Name::new("stub"), - fields: vec![], +/// Extract enum definition from CST. +fn lower_enum(node: &SyntaxNode) -> Option { + use baml_syntax::ast::{EnumDef, EnumVariant}; + + let enum_def = EnumDef::cast(node.clone())?; + + // Check if the enum has proper structure (braces) + // Malformed enums from error recovery (e.g., "enum" without name/braces) should be skipped + let has_braces = enum_def + .syntax() + .children_with_tokens() + .filter_map(rowan::NodeOrToken::into_token) + .any(|t| t.kind() == baml_syntax::SyntaxKind::L_BRACE); + + if !has_braces { + return None; + } + + // Extract name manually (EnumDef doesn't have accessor methods yet) + // Pattern: enum { ... } + // The name is the first WORD token after the "enum" keyword + let name = enum_def + .syntax() + .children_with_tokens() + .filter_map(rowan::NodeOrToken::into_token) + .find(|token| token.kind() == baml_syntax::SyntaxKind::WORD) // Get the first WORD (which is the name, not "enum" - enum is KW_ENUM) + .map(|t| Name::new(t.text())) + .unwrap_or_else(|| Name::new("UnnamedEnum")); + + // Extract variants + let mut variants = Vec::new(); + for child in enum_def.syntax().children() { + if let Some(variant_node) = EnumVariant::cast(child) { + // Get the variant name (first WORD token in the variant) + if let Some(name_token) = variant_node + .syntax() + .children_with_tokens() + .filter_map(rowan::NodeOrToken::into_token) + .find(|t| t.kind() == baml_syntax::SyntaxKind::WORD) + { + variants.push(crate::EnumVariant { + name: Name::new(name_token.text()), + }); + } + } + } + + Some(Enum { name, variants }) +} + +/// Extract function definition from CST - MINIMAL VERSION. +/// Only extracts the name. Signature and body are in separate queries. +fn lower_function(node: &SyntaxNode) -> Option { + use baml_syntax::ast::FunctionDef; + + let func = FunctionDef::cast(node.clone())?; + let name = func.name()?.text().into(); + + Some(Function { name }) +} + +/// Extract type alias from CST. +fn lower_type_alias(node: &SyntaxNode) -> Option { + use baml_syntax::ast::TypeAliasDef; + + let _alias = TypeAliasDef::cast(node.clone())?; + // TODO: Extract name and type once AST has methods + // For now, use placeholder - name-based IDs handle stability + let name = Name::new("TypeAlias"); + let type_ref = TypeRef::Unknown; + + Some(TypeAlias { name, type_ref }) +} + +/// Extract client configuration from CST. +fn lower_client(node: &SyntaxNode) -> Option { + use baml_syntax::ast::{ClientDef, ConfigItem}; + + let client_def = ClientDef::cast(node.clone())?; + + // Extract name manually (ClientDef doesn't have accessor methods yet) + // Pattern: client { ... } + // The name is the first WORD token ("client" is KW_CLIENT, not WORD) + let name = client_def + .syntax() + .children_with_tokens() + .filter_map(rowan::NodeOrToken::into_token) + .find(|token| token.kind() == baml_syntax::SyntaxKind::WORD) // Get the first WORD (the name) + .map(|t| Name::new(t.text())) + .unwrap_or_else(|| Name::new("UnnamedClient")); + + // Extract provider from config block + // Pattern: provider + let provider = client_def + .syntax() + .descendants() + .filter_map(ConfigItem::cast) + .find_map(|item| { + let text = item.syntax().text().to_string(); + if text.trim().starts_with("provider") { + // Extract the provider name after "provider" + item.syntax() + .children_with_tokens() + .filter_map(rowan::NodeOrToken::into_token) + .filter(|t| t.kind() == baml_syntax::SyntaxKind::WORD) + .nth(1) // Skip "provider" keyword + .map(|t| Name::new(t.text())) + } else { + None + } + }) + .unwrap_or_else(|| Name::new("unknown")); + + Some(Client { name, provider }) +} + +/// Extract test definition from CST. +fn lower_test(node: &SyntaxNode) -> Option { + use baml_syntax::ast::TestDef; + + let _test = TestDef::cast(node.clone())?; + // TODO: Extract name and functions once AST has methods + let name = Name::new("Test"); + let function_refs = vec![]; + + Some(Test { + name, + function_refs, + }) +} + +/// Lower a type reference from CST. +/// +/// For now, this is a simplified implementation that extracts just the name. +/// TODO: Parse complex types (optional, list, union, etc.) +fn lower_type_ref(node: &baml_syntax::ast::TypeExpr) -> TypeRef { + // For now, just extract the text representation + // This is a simplification - we'll enhance this later + let text = node.syntax().text().to_string(); + let text = text.trim(); + + // Handle primitives + match text { + "int" => TypeRef::Int, + "float" => TypeRef::Float, + "string" => TypeRef::String, + "bool" => TypeRef::Bool, + "null" => TypeRef::Null, + "image" => TypeRef::Image, + "audio" => TypeRef::Audio, + "video" => TypeRef::Video, + "pdf" => TypeRef::Pdf, + _ => { + // Check if it ends with '?' (optional) + if let Some(inner_text) = text.strip_suffix('?') { + let inner = TypeRef::named(inner_text.into()); + TypeRef::optional(inner) + } + // Check if it ends with '[]' (list) + else if let Some(inner_text) = text.strip_suffix("[]") { + let inner = TypeRef::named(inner_text.into()); + TypeRef::list(inner) + } + // Otherwise treat as named type + else { + TypeRef::named(text.into()) + } + } } } diff --git a/baml_language/crates/baml_hir/src/loc.rs b/baml_language/crates/baml_hir/src/loc.rs new file mode 100644 index 0000000000..5186fe8318 --- /dev/null +++ b/baml_language/crates/baml_hir/src/loc.rs @@ -0,0 +1,75 @@ +//! Location types for interning. +//! +//! Each location uniquely identifies where an item is defined: +//! - File (current implementation) +//! - Position within that file's `ItemTree` +//! +//! These locations are interned by Salsa to produce compact, stable IDs. +//! +//! Note: We use `FileId` directly instead of `ContainerId` for now to avoid +//! Salsa complications with non-Copy enums. When we add modules, we'll +//! need to refactor this. + +use crate::ids::LocalItemId; +use baml_base::FileId; + +/// Marker types for different item kinds in the `ItemTree`. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct FunctionMarker; +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct ClassMarker; +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct EnumMarker; +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct TypeAliasMarker; +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct ClientMarker; +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub struct TestMarker; + +/// Location of a function in the source code. +/// +/// This gets interned by Salsa to produce a `FunctionId`. +#[salsa::interned] +pub struct FunctionLoc { + /// File containing this function. + pub file: FileId, + + /// Index in the file's ItemTree. + pub id: LocalItemId, +} + +/// Location of a class definition. +#[salsa::interned] +pub struct ClassLoc { + pub file: FileId, + pub id: LocalItemId, +} + +/// Location of an enum definition. +#[salsa::interned] +pub struct EnumLoc { + pub file: FileId, + pub id: LocalItemId, +} + +/// Location of a type alias. +#[salsa::interned] +pub struct TypeAliasLoc { + pub file: FileId, + pub id: LocalItemId, +} + +/// Location of a client configuration. +#[salsa::interned] +pub struct ClientLoc { + pub file: FileId, + pub id: LocalItemId, +} + +/// Location of a test definition. +#[salsa::interned] +pub struct TestLoc { + pub file: FileId, + pub id: LocalItemId, +} diff --git a/baml_language/crates/baml_hir/src/path.rs b/baml_language/crates/baml_hir/src/path.rs new file mode 100644 index 0000000000..25b8bc2328 --- /dev/null +++ b/baml_language/crates/baml_hir/src/path.rs @@ -0,0 +1,75 @@ +//! Path representation for name resolution. +//! +//! Paths allow referencing items across module boundaries (future feature). +//! Today: All paths are single-segment (e.g., "User") +//! Future: Multi-segment paths (e.g., "`users::User`") + +use baml_base::Name; + +/// A path to an item (`foo::bar::Baz`). +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct Path { + /// Path segments (`["foo", "bar", "Baz"]`). + pub segments: Vec, + + /// Path kind (absolute vs relative). + pub kind: PathKind, +} + +/// The kind of path resolution. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +pub enum PathKind { + /// Relative path (`foo::bar`). + /// Resolved relative to current scope. + Plain, + + /// Absolute path (`::foo::bar`) (future feature). + /// Resolved from project root. + #[allow(dead_code)] + Absolute, + + /// Super path (`super::foo`) (future feature). + /// Resolved relative to parent module. + #[allow(dead_code)] + Super { count: u32 }, +} + +impl Path { + /// Create a simple single-segment path. + pub fn single(name: Name) -> Self { + Path { + segments: vec![name], + kind: PathKind::Plain, + } + } + + /// Create a multi-segment path (future feature). + #[allow(dead_code)] + pub fn new(segments: Vec) -> Self { + Path { + segments, + kind: PathKind::Plain, + } + } + + /// Check if this is a simple name (no :: separators). + pub fn is_simple(&self) -> bool { + self.segments.len() == 1 && self.kind == PathKind::Plain + } + + /// Get the final segment (the item name). + pub fn last_segment(&self) -> Option<&Name> { + self.segments.last() + } + + /// Get the first segment. + pub fn first_segment(&self) -> Option<&Name> { + self.segments.first() + } +} + +impl From for Path { + fn from(name: Name) -> Self { + Path::single(name) + } +} diff --git a/baml_language/crates/baml_hir/src/signature.rs b/baml_language/crates/baml_hir/src/signature.rs new file mode 100644 index 0000000000..db558ba923 --- /dev/null +++ b/baml_language/crates/baml_hir/src/signature.rs @@ -0,0 +1,125 @@ +//! Function signatures (parameters, return types, generics). +//! +//! Separated from `ItemTree` to provide fine-grained incrementality. +//! Signature changes invalidate type checking, but not name resolution. + +use crate::{Name, type_ref::TypeRef}; +use rowan::ast::AstNode; +use std::sync::Arc; + +/// The signature of a function (everything except the body). +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct FunctionSignature { + /// Function name (duplicated from `ItemTree` for convenience) + pub name: Name, + + /// Function parameters + pub params: Vec, + + /// Return type + pub return_type: TypeRef, + + /// Attributes/modifiers + pub attrs: FunctionAttributes, + // Note: Generic parameters are queried separately via generic_params() + // for incrementality - changes to generics don't invalidate signatures +} + +/// Function parameter. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Param { + pub name: Name, + pub type_ref: TypeRef, +} + +/// Function attributes and modifiers. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct FunctionAttributes { + /// Whether this is a streaming function + pub is_streaming: bool, + + /// Whether this is async + pub is_async: bool, + + /// Custom attributes (@@retry, @@cache, etc.) + pub custom_attrs: Vec, +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CustomAttribute { + pub name: Name, + pub args: Vec, // Simplified for now +} + +impl FunctionSignature { + /// Lower a function signature from CST. + pub fn lower(func_node: &baml_syntax::ast::FunctionDef) -> Arc { + let name = func_node + .name() + .map(|n| Name::new(n.text())) + .unwrap_or_else(|| Name::new("UnnamedFunction")); + + // Extract parameters + let mut params = Vec::new(); + if let Some(param_list) = func_node.param_list() { + for param_node in param_list.params() { + if let Some(name_token) = param_node.name() { + let type_ref = param_node + .ty() + .map(|t| lower_type_ref(&t)) + .unwrap_or(TypeRef::Unknown); + + params.push(Param { + name: Name::new(name_token.text()), + type_ref, + }); + } + } + } + + // Extract return type + let return_type = func_node + .return_type() + .map(|t| lower_type_ref(&t)) + .unwrap_or(TypeRef::Unknown); + + // Extract attributes (future work) + let attrs = FunctionAttributes::default(); + + Arc::new(FunctionSignature { + name, + params, + return_type, + attrs, + }) + } +} + +/// Lower a type reference from CST. +fn lower_type_ref(node: &baml_syntax::ast::TypeExpr) -> TypeRef { + let text = node.syntax().text().to_string(); + let text = text.trim(); + + match text { + "int" => TypeRef::Int, + "float" => TypeRef::Float, + "string" => TypeRef::String, + "bool" => TypeRef::Bool, + "null" => TypeRef::Null, + "image" => TypeRef::Image, + "audio" => TypeRef::Audio, + "video" => TypeRef::Video, + "pdf" => TypeRef::Pdf, + _ => { + if let Some(inner_text) = text.strip_suffix('?') { + let inner = TypeRef::named(inner_text.into()); + TypeRef::optional(inner) + } else if let Some(inner_text) = text.strip_suffix("[]") { + let inner = TypeRef::named(inner_text.into()); + TypeRef::list(inner) + } else { + TypeRef::named(text.into()) + } + } + } +} diff --git a/baml_language/crates/baml_hir/src/type_ref.rs b/baml_language/crates/baml_hir/src/type_ref.rs new file mode 100644 index 0000000000..942da8a89b --- /dev/null +++ b/baml_language/crates/baml_hir/src/type_ref.rs @@ -0,0 +1,84 @@ +//! Unresolved type references in the HIR. +//! +//! These are type references before name resolution. +//! `TypeRef` -> Ty happens during THIR construction. + +use crate::path::Path; +use baml_base::Name; + +/// A type reference before name resolution. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum TypeRef { + /// Named type (with path for future module support). + /// Examples: + /// `Path::single("User`") -> User + /// `Path::new`(`["users", "User"]`) -> `users::User` (future) + Path(Path), + + /// Primitive types (no resolution needed). + Int, + Float, + String, + Bool, + Null, + Image, + Audio, + Video, + Pdf, + + /// Type constructors. + Optional(Box), + List(Box), + Map { + key: Box, + value: Box, + }, + Union(Vec), + + /// Literal types in unions. + StringLiteral(String), + IntLiteral(i64), + /// Float literal stored as string to avoid f64's lack of Eq/Hash. + FloatLiteral(String), + + /// Future: Generic type application. + /// Example: Result + #[allow(dead_code)] + Generic { + base: Box, + args: Vec, + }, + + /// Future: Type parameter reference. + /// Example: T in `function(x: T) -> T` + #[allow(dead_code)] + TypeParam(Name), + + /// Error sentinel. + Error, + + /// Unknown/inferred. + Unknown, +} + +impl TypeRef { + /// Create a simple named type reference. + pub fn named(name: Name) -> Self { + TypeRef::Path(Path::single(name)) + } + + /// Create an optional type. + pub fn optional(inner: TypeRef) -> Self { + TypeRef::Optional(Box::new(inner)) + } + + /// Create a list type. + pub fn list(inner: TypeRef) -> Self { + TypeRef::List(Box::new(inner)) + } + + /// Create a union type. + pub fn union(types: Vec) -> Self { + TypeRef::Union(types) + } +} diff --git a/baml_language/crates/baml_onionskin/src/compiler.rs b/baml_language/crates/baml_onionskin/src/compiler.rs index 2d7d44abf7..a8bcf17dbb 100644 --- a/baml_language/crates/baml_onionskin/src/compiler.rs +++ b/baml_language/crates/baml_onionskin/src/compiler.rs @@ -466,7 +466,8 @@ impl CompilerRunner { let file_path = path.display().to_string(); // Use real baml_hir for item extraction - let items = baml_hir::file_items(&self.db, *source_file); + let items_struct = baml_hir::file_items(&self.db, *source_file); + let items = items_struct.items(&self.db); // Check if THIS specific file was modified let file_recomputed = self.modified_files.contains(path); @@ -476,7 +477,7 @@ impl CompilerRunner { // Show real HIR items if !items.is_empty() { - for item in &items { + for item in items { let item_line = format!(" {item:?}"); writeln!(output, "{item_line}").ok(); output_annotated.push(( diff --git a/baml_language/crates/baml_parser/src/parser.rs b/baml_language/crates/baml_parser/src/parser.rs index 48443d413a..3610113e51 100644 --- a/baml_language/crates/baml_parser/src/parser.rs +++ b/baml_language/crates/baml_parser/src/parser.rs @@ -1066,11 +1066,15 @@ impl<'a> Parser<'a> { p.error("Expected parameter name".to_string()); } - // Type annotation + // Type annotation - supports both "name: type" and "name type" syntax if p.eat(TokenKind::Colon) { + // With colon: "name: type" + p.parse_type(); + } else if p.at(TokenKind::Word) { + // Without colon: "name type" (whitespace-separated) p.parse_type(); } else { - p.error("Expected type annotation (:)".to_string()); + p.error("Expected type annotation".to_string()); } }); } @@ -1457,15 +1461,17 @@ impl<'a> Parser<'a> { // Object literal/constructor // Check if we have a preceding expression (constructor name/expression) // by checking if we've emitted any events since expr_start - if self.events.len() > expr_start { - // We have a preceding expression, treat as object literal/constructor + if self.events.len() > expr_start && self.looks_like_object_constructor() { + // We have a preceding expression that looks like a type/constructor, + // treat as object literal/constructor let lhs_start = self.find_previous_expr_start_after(expr_start); self.wrap_events_in_node(lhs_start, SyntaxKind::OBJECT_LITERAL); self.parse_object_literal_body(); self.finish_node(); } else { - // No preceding expression, this is a block expression - // Break and let parse_primary_expr handle it + // No preceding expression, or preceding expression doesn't look like + // a constructor (e.g., it's a literal or binary expression) + // Don't consume the brace - it's likely a block/body for an outer construct break; } } else if let Some((left_bp, right_bp)) = Self::infix_binding_power(op) { @@ -1521,6 +1527,48 @@ impl<'a> Parser<'a> { min_index } + /// Check if the most recent expression looks like a constructor/type name + /// that can be followed by `{` for object literal construction. + /// + /// Returns true for: + /// - Simple identifiers (e.g., `Point`) + /// - Path expressions (e.g., `module.Type` for future module support) + /// + /// Returns false for everything else: + /// - Literals (e.g., `18`, `"string"`) + /// - Binary expressions (e.g., `a < b`) + /// - Function calls (e.g., `func()`) + /// - Any other complex expression + fn looks_like_object_constructor(&self) -> bool { + // Walk backward to find the most recent complete expression + let mut depth = 0; + for event in self.events.iter().rev() { + match event { + Event::FinishNode => depth += 1, + Event::StartNode { kind } => { + depth -= 1; + if depth == 0 { + // We just closed a complete expression + // Allow PATH_EXPR or FIELD_ACCESS_EXPR for module-qualified types + return matches!( + kind, + SyntaxKind::PATH_EXPR | SyntaxKind::FIELD_ACCESS_EXPR + ); + } + } + Event::Token { kind, .. } => { + if depth == 0 { + // The most recent thing is a bare token (no wrapping node) + // Only WORD tokens can be type names + return *kind == SyntaxKind::WORD; + } + } + Event::Error { .. } => {} + } + } + false + } + /// Wrap events from `start_index` onwards in a new node /// This allows us to retroactively wrap parsed expressions. /// diff --git a/baml_language/crates/baml_syntax/src/ast.rs b/baml_language/crates/baml_syntax/src/ast.rs index 3e7cecb473..bc2352cb58 100644 --- a/baml_language/crates/baml_syntax/src/ast.rs +++ b/baml_language/crates/baml_syntax/src/ast.rs @@ -93,7 +93,7 @@ impl FunctionDef { .filter(|token| { token.kind() == SyntaxKind::WORD && token.parent() == Some(self.syntax.clone()) }) - .nth(1) // Skip the "function" keyword, get the second WORD + .nth(0) // Get the first WORD (function keyword is KW_FUNCTION, not WORD) } /// Get the parameter list. @@ -132,6 +132,21 @@ impl FunctionDef { } } +impl Parameter { + /// Get the parameter name. + pub fn name(&self) -> Option { + self.syntax + .children_with_tokens() + .filter_map(rowan::NodeOrToken::into_token) + .find(|token| token.kind() == SyntaxKind::WORD) + } + + /// Get the parameter type. + pub fn ty(&self) -> Option { + self.syntax.children().find_map(TypeExpr::cast) + } +} + impl ParameterList { /// Get all parameters. pub fn params(&self) -> impl Iterator { @@ -148,7 +163,7 @@ impl ClassDef { .filter(|token| { token.kind() == SyntaxKind::WORD && token.parent() == Some(self.syntax.clone()) }) - .nth(1) // Skip the "class" keyword, get the second WORD + .nth(0) // Get the first WORD (class keyword is KW_CLASS, not WORD) } /// Get all fields. diff --git a/baml_language/crates/baml_syntax/src/builder.rs b/baml_language/crates/baml_syntax/src/builder.rs index 54e2193114..e96ff4de27 100644 --- a/baml_language/crates/baml_syntax/src/builder.rs +++ b/baml_language/crates/baml_syntax/src/builder.rs @@ -56,7 +56,7 @@ impl SyntaxTreeBuilder { builder.start_node(SyntaxKind::FUNCTION_DEF); // function keyword - builder.token(SyntaxKind::WORD, "function"); + builder.token(SyntaxKind::KW_FUNCTION, "function"); builder.ws(" "); // function name @@ -120,7 +120,7 @@ impl SyntaxTreeBuilder { builder.start_node(SyntaxKind::CLASS_DEF); // class keyword - builder.token(SyntaxKind::WORD, "class"); + builder.token(SyntaxKind::KW_CLASS, "class"); builder.ws(" "); // class name diff --git a/baml_language/crates/baml_tests/build.rs b/baml_language/crates/baml_tests/build.rs index 5b5c5fa590..32d8b1cd90 100644 --- a/baml_language/crates/baml_tests/build.rs +++ b/baml_language/crates/baml_tests/build.rs @@ -390,13 +390,14 @@ fn generate_hir_test(file: &mut File, project: &TestProject) -> std::io::Result< writeln!(file, " #[test]")?; writeln!(file, " fn test_03_hir() {{")?; writeln!(file, " let mut db = RootDatabase::new();")?; + writeln!(file, " let mut output = String::new();")?; writeln!( file, - " let root = db.set_project_root(std::path::PathBuf::from(\".\"));" + " writeln!(output, \"=== HIR ITEMS ===\").unwrap();" )?; writeln!(file)?; - // Load all files + // Load all files and format items per file for baml_file in &project.files { writeln!(file, " {{")?; writeln!( @@ -408,7 +409,7 @@ fn generate_hir_test(file: &mut File, project: &TestProject) -> std::io::Result< file, " let content = content.replace(\"\\r\\n\", \"\\n\");" )?; - writeln!(file, " db.add_file(")?; + writeln!(file, " let source_file = db.add_file(")?; writeln!( file, " \"{}\",", @@ -416,31 +417,27 @@ fn generate_hir_test(file: &mut File, project: &TestProject) -> std::io::Result< )?; writeln!(file, " &content,")?; writeln!(file, " );")?; + writeln!( + file, + " let items_struct = baml_hir::file_items(&db, source_file);" + )?; + writeln!(file, " let items = items_struct.items(&db);")?; + writeln!(file, " if !items.is_empty() {{")?; + writeln!( + file, + " let formatted = crate::format_hir_file(&db, source_file, items);" + )?; + writeln!(file, " output.push_str(&formatted);")?; + writeln!(file, " }}")?; writeln!(file, " }}")?; } writeln!(file)?; - writeln!( - file, - " let items = baml_hir::project_items(&db, root);" - )?; - writeln!(file, " let mut output = String::new();")?; - writeln!( - file, - " writeln!(output, \"=== HIR ITEMS ===\").unwrap();" - )?; - writeln!(file, " if items.is_empty() {{")?; + writeln!(file, " if output.trim() == \"=== HIR ITEMS ===\" {{")?; writeln!( file, " writeln!(output, \"No items found.\").unwrap();" )?; - writeln!(file, " }} else {{")?; - writeln!(file, " for item in items.iter() {{")?; - writeln!( - file, - " writeln!(output, \" {{:?}}\", item).unwrap();" - )?; - writeln!(file, " }}")?; writeln!(file, " }}")?; writeln!(file)?; writeln!( @@ -491,8 +488,9 @@ fn generate_thir_test(file: &mut File, project: &TestProject) -> std::io::Result writeln!(file)?; writeln!( file, - " let items = baml_hir::project_items(&db, root);" + " let items_struct = baml_hir::project_items(&db, root);" )?; + writeln!(file, " let items = items_struct.items(&db);")?; writeln!(file, " let mut output = String::new();")?; writeln!( file, @@ -506,7 +504,7 @@ fn generate_thir_test(file: &mut File, project: &TestProject) -> std::io::Result )?; writeln!( file, - " let result = baml_thir::infer_function(&db, func_id.clone());" + " let result = baml_thir::infer_function(&db, *func_id);" )?; writeln!( file, diff --git a/baml_language/crates/baml_tests/projects/parser_expressions/field_access.baml b/baml_language/crates/baml_tests/projects/parser_expressions/field_access.baml new file mode 100644 index 0000000000..7a057f0c5e --- /dev/null +++ b/baml_language/crates/baml_tests/projects/parser_expressions/field_access.baml @@ -0,0 +1,30 @@ +function FieldAccess(user User) -> string { + // Simple field access + let name = user.name; + + // Nested field access + let bio = user.profile.bio; + + // Deep nesting + let theme = user.profile.settings.theme; + + // Field access then array index + let firstTag = user.tags[0]; + + return theme; +} + +class User { + name string + profile Profile + tags string[] +} + +class Profile { + bio string + settings Settings +} + +class Settings { + theme string +} diff --git a/baml_language/crates/baml_tests/projects/parser_expressions/index_access.baml b/baml_language/crates/baml_tests/projects/parser_expressions/index_access.baml new file mode 100644 index 0000000000..8a70c1ccd1 --- /dev/null +++ b/baml_language/crates/baml_tests/projects/parser_expressions/index_access.baml @@ -0,0 +1,24 @@ +// Test index access expressions + +class User { + name string + age int + tags string[] +} + +function IndexAccess(users User[]) -> string { + // Array indexing with literal + let first = users[0]; + + // Array indexing with variable + let idx = 1; + let second = users[idx]; + + // Nested: array element field access + let firstName = users[0].name; + + // Deeply nested: array then field then index + let tag = users[0].tags[0]; + + return firstName; +} diff --git a/baml_language/crates/baml_tests/snapshots/basic_types/baml_tests__basic_types__03_hir.snap b/baml_language/crates/baml_tests/snapshots/basic_types/baml_tests__basic_types__03_hir.snap index 4254c4f0e6..21535aa5ff 100644 --- a/baml_language/crates/baml_tests/snapshots/basic_types/baml_tests__basic_types__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/basic_types/baml_tests__basic_types__03_hir.snap @@ -1,6 +1,30 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +function GetStatus { + return: Path(Path { segments: ["Status"], kind: Plain }) + body: Llm { + client: GPT4 + prompt: "Get status" + } +} +function GetUser { + params: [id: Int] + return: Path(Path { segments: ["User"], kind: Plain }) + body: Llm { + client: GPT4 + prompt: "Get user {{id}}" + interpolations: [id] + } +} +class User { + id: Int + name: String + email: String +} +enum Status { + EnumVariant { name: "Active" } + EnumVariant { name: "Inactive" } +} diff --git a/baml_language/crates/baml_tests/snapshots/error_cases/baml_tests__error_cases__03_hir.snap b/baml_language/crates/baml_tests/snapshots/error_cases/baml_tests__error_cases__03_hir.snap index 4254c4f0e6..bdd782d599 100644 --- a/baml_language/crates/baml_tests/snapshots/error_cases/baml_tests__error_cases__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/error_cases/baml_tests__error_cases__03_hir.snap @@ -1,6 +1,9 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +class Broken { + field: Int + Invalid: Path(Path { segments: ["()"], kind: Plain }) +} diff --git a/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__02_parser__fetch_as.snap b/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__02_parser__fetch_as.snap index 55dd300a84..64e968a63e 100644 --- a/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__02_parser__fetch_as.snap +++ b/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__02_parser__fetch_as.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 564 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === diff --git a/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__03_hir.snap b/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__03_hir.snap index 78ab5579a4..a3bed72f10 100644 --- a/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__03_hir.snap @@ -3,4 +3,20 @@ source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +function GetTodo { + return: Path(Path { segments: ["Todo"], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Missing + Idx::(1): Call { callee: Idx::(0), args: [] } + Idx::(2): Block { stmts: [], tail_expr: Some(Idx::(1)) } + ] + root: Idx::(2) + } +} +class Todo { + id: Int + title: String + completed: Bool + userId: Int +} diff --git a/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__05_diagnostics.snap b/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__05_diagnostics.snap index d3639e7656..555b982606 100644 --- a/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__05_diagnostics.snap +++ b/baml_language/crates/baml_tests/snapshots/generics/baml_tests__generics__05_diagnostics.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 665 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === DIAGNOSTICS === diff --git a/baml_language/crates/baml_tests/snapshots/parser_constructors/baml_tests__parser_constructors__03_hir.snap b/baml_language/crates/baml_tests/snapshots/parser_constructors/baml_tests__parser_constructors__03_hir.snap index 78ab5579a4..fbe6a75350 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_constructors/baml_tests__parser_constructors__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_constructors/baml_tests__parser_constructors__03_hir.snap @@ -3,4 +3,141 @@ source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +function boolArray { + return: List(Path(Path { segments: ["bool"], kind: Plain })) + body: Expr { + exprs: [ + Idx::(0): Array { elements: [] } + Idx::(1): Block { stmts: [], tail_expr: Some(Idx::(0)) } + ] + root: Idx::(1) + } +} +function floatArray { + return: List(Path(Path { segments: ["float"], kind: Plain })) + body: Expr { + exprs: [ + Idx::(0): Array { elements: [] } + Idx::(1): Block { stmts: [], tail_expr: Some(Idx::(0)) } + ] + root: Idx::(1) + } +} +function pointArray { + return: List(Path(Path { segments: ["Point"], kind: Plain })) + body: Expr { + exprs: [ + Idx::(0): Missing + Idx::(1): Missing + Idx::(2): Object { type_name: Some("Point"), fields: [("x", Idx::(0)), ("y", Idx::(1))] } + Idx::(3): Missing + Idx::(4): Missing + Idx::(5): Object { type_name: Some("Point"), fields: [("x", Idx::(3)), ("y", Idx::(4))] } + Idx::(6): Missing + Idx::(7): Missing + Idx::(8): Object { type_name: Some("Point"), fields: [("x", Idx::(6)), ("y", Idx::(7))] } + Idx::(9): Array { elements: [Idx::(2), Idx::(5), Idx::(8)] } + Idx::(10): Block { stmts: [], tail_expr: Some(Idx::(9)) } + ] + root: Idx::(10) + } +} +function stringArray { + return: List(Path(Path { segments: ["string"], kind: Plain })) + body: Expr { + exprs: [ + Idx::(0): Literal(String("hello")) + Idx::(1): Literal(String(" \"world\"")) + Idx::(2): Literal(String(" \"test\"")) + Idx::(3): Array { elements: [Idx::(0), Idx::(1), Idx::(2)] } + Idx::(4): Block { stmts: [], tail_expr: Some(Idx::(3)) } + ] + root: Idx::(4) + } +} +function intArray { + return: List(Path(Path { segments: ["int"], kind: Plain })) + body: Expr { + exprs: [ + Idx::(0): Array { elements: [] } + Idx::(1): Block { stmts: [], tail_expr: Some(Idx::(0)) } + ] + root: Idx::(1) + } +} +class Point { + x: Int + y: Int +} +function point { + return: Path(Path { segments: ["Point"], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Missing + Idx::(1): Missing + Idx::(2): Object { type_name: Some("Point"), fields: [("x", Idx::(0)), ("y", Idx::(1))] } + Idx::(3): Block { stmts: [], tail_expr: Some(Idx::(2)) } + ] + root: Idx::(3) + } +} +function vec2d { + return: Path(Path { segments: ["Vec2D"], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Missing + Idx::(1): Missing + Idx::(2): Object { type_name: Some("Point"), fields: [("x", Idx::(0)), ("y", Idx::(1))] } + Idx::(3): Missing + Idx::(4): Missing + Idx::(5): Object { type_name: Some("Point"), fields: [("x", Idx::(3)), ("y", Idx::(4))] } + Idx::(6): Object { type_name: Some("Vec2D"), fields: [("p", Idx::(2)), ("q", Idx::(5))] } + Idx::(7): Block { stmts: [], tail_expr: Some(Idx::(6)) } + ] + root: Idx::(7) + } +} +class Vec2D { + p: Path(Path { segments: ["Point"], kind: Plain }) + q: Path(Path { segments: ["Point"], kind: Plain }) +} +class Point { + x: Int + y: Int +} +function floatValues { + return: Path(Path { segments: ["map"], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Block { stmts: [], tail_expr: None } + ] + root: Idx::(0) + } +} +function stringValues { + return: Path(Path { segments: ["map"], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Block { stmts: [], tail_expr: None } + ] + root: Idx::(0) + } +} +function intValues { + return: Path(Path { segments: ["map"], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Block { stmts: [], tail_expr: None } + ] + root: Idx::(0) + } +} +function boolValues { + return: Path(Path { segments: ["map"], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Block { stmts: [], tail_expr: None } + ] + root: Idx::(0) + } +} diff --git a/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__02_parser__partial_input.snap b/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__02_parser__partial_input.snap index d7183850fe..99e05ac066 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__02_parser__partial_input.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__02_parser__partial_input.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 1431 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -44,10 +43,10 @@ SOURCE_FILE WORD "Incomplete" PARAMETER_LIST L_PAREN "(" - PARAMETER " // Missing parameters closing - param1" + PARAMETER WORD "param1" - WORD "string" + TYPE_EXPR " string" + WORD "string" FUNCTION_DEF KW_FUNCTION "function" WORD "NextFunction" @@ -92,11 +91,9 @@ enum // Missing enum name Expected Expected type, found Expected type Expected Expected RParen, found Word, found Expected RParen, found Word Expected Expected type, found Expected type - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word + Expected Expected RParen, found Function, found Expected RParen, found Function Expected Expected return type (->), found Expected return type (->) Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration Expected Expected LBrace, found Word, found Expected LBrace, found Word Expected Expected top-level declaration, found Expected top-level declaration Expected Expected top-level declaration, found Expected top-level declaration diff --git a/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__03_hir.snap b/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__03_hir.snap index 4254c4f0e6..39ac56f92a 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__03_hir.snap @@ -1,6 +1,59 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +function Foo { + return: Path(Path { segments: [""], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Block { stmts: [], tail_expr: None } + ] + root: Idx::(0) + } +} +enum Status { + EnumVariant { name: "ACTIVE" } + EnumVariant { name: "INACTIVE" } + EnumVariant { name: "PENDING" } +} +class User { + name: String + Another: Path(Path { segments: [""], kind: Plain }) + field: Int +} +function NextFunction { + return: String + body: Expr { + exprs: [ + Idx::(0): Literal(String(" \"parsed\"")) + Idx::(1): Block { stmts: [Idx::(0)], tail_expr: None } + ] + stmts: [ + Idx::(0): Return(Some(Idx::(0))) + ] + root: Idx::(1) + } +} +function Incomplete { + params: [param1: String] + return: Unknown + body: Missing +} +class Partial { + field1: Path(Path { segments: ["str"], kind: Plain }) + field2: Path(Path { segments: ["// Missing type entirely\n field3"], kind: Plain }) + string: Path(Path { segments: [""], kind: Plain }) + string: Path(Path { segments: [""], kind: Plain }) + string: Path(Path { segments: [""], kind: Plain }) +} +enum ValidEnum { + EnumVariant { name: "OPTION1" } + EnumVariant { name: "OPTION2" } +} +class Test { + field1: String + field2: String + another: Path(Path { segments: ["closed"], kind: Plain }) + string: Path(Path { segments: ["\") // Should still parse this\n}"], kind: Plain }) +} diff --git a/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__05_diagnostics.snap b/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__05_diagnostics.snap index bb8707d633..0ff650ee8c 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__05_diagnostics.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_error_recovery/baml_tests__parser_error_recovery__05_diagnostics.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 1646 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === DIAGNOSTICS === @@ -21,11 +20,9 @@ expression: output [parse] Expected Expected type, found Expected type [parse] Expected Expected RParen, found Word, found Expected RParen, found Word [parse] Expected Expected type, found Expected type - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word + [parse] Expected Expected RParen, found Function, found Expected RParen, found Function [parse] Expected Expected return type (->), found Expected return type (->) [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected LBrace, found Word, found Expected LBrace, found Word [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected top-level declaration, found Expected top-level declaration diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__field_access.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__field_access.snap new file mode 100644 index 0000000000..ae985c631c --- /dev/null +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__field_access.snap @@ -0,0 +1,101 @@ +--- +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs +expression: output +--- +Function "function" +Word "FieldAccess" +LParen "(" +Word "user" +Word "User" +RParen ")" +Arrow "->" +Word "string" +LBrace "{" +Slash "/" +Slash "/" +Word "Simple" +Word "field" +Word "access" +Let "let" +Word "name" +Equals "=" +Word "user" +Dot "." +Word "name" +Semicolon ";" +Slash "/" +Slash "/" +Word "Nested" +Word "field" +Word "access" +Let "let" +Word "bio" +Equals "=" +Word "user" +Dot "." +Word "profile" +Dot "." +Word "bio" +Semicolon ";" +Slash "/" +Slash "/" +Word "Deep" +Word "nesting" +Let "let" +Word "theme" +Equals "=" +Word "user" +Dot "." +Word "profile" +Dot "." +Word "settings" +Dot "." +Word "theme" +Semicolon ";" +Slash "/" +Slash "/" +Word "Field" +Word "access" +Word "then" +Word "array" +Word "index" +Let "let" +Word "firstTag" +Equals "=" +Word "user" +Dot "." +Word "tags" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Semicolon ";" +Return "return" +Word "theme" +Semicolon ";" +RBrace "}" +Class "class" +Word "User" +LBrace "{" +Word "name" +Word "string" +Word "profile" +Word "Profile" +Word "tags" +Word "string" +LBracket "[" +RBracket "]" +RBrace "}" +Class "class" +Word "Profile" +LBrace "{" +Word "bio" +Word "string" +Word "settings" +Word "Settings" +RBrace "}" +Class "class" +Word "Settings" +LBrace "{" +Word "theme" +Word "string" +RBrace "}" diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__field_index_access.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__field_index_access.snap new file mode 100644 index 0000000000..42354a43d3 --- /dev/null +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__field_index_access.snap @@ -0,0 +1,216 @@ +--- +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs +expression: output +--- +Slash "/" +Slash "/" +Word "Test" +Word "field" +Word "access" +Word "and" +Word "index" +Word "access" +Word "expressions" +Class "class" +Word "User" +LBrace "{" +Word "name" +Word "string" +Word "age" +Word "int" +Word "profile" +Word "Profile" +Word "tags" +Word "string" +LBracket "[" +RBracket "]" +RBrace "}" +Class "class" +Word "Profile" +LBrace "{" +Word "bio" +Word "string" +Word "settings" +Word "Settings" +RBrace "}" +Class "class" +Word "Settings" +LBrace "{" +Word "theme" +Word "string" +RBrace "}" +Function "function" +Word "FieldAccess" +LParen "(" +Word "user" +Word "User" +RParen ")" +Arrow "->" +Word "string" +LBrace "{" +Slash "/" +Slash "/" +Word "Simple" +Word "field" +Word "access" +Let "let" +Word "name" +Equals "=" +Word "user" +Dot "." +Word "name" +Slash "/" +Slash "/" +Word "Nested" +Word "field" +Word "access" +Let "let" +Word "bio" +Equals "=" +Word "user" +Dot "." +Word "profile" +Dot "." +Word "bio" +Slash "/" +Slash "/" +Word "Deep" +Word "nesting" +Let "let" +Word "theme" +Equals "=" +Word "user" +Dot "." +Word "profile" +Dot "." +Word "settings" +Dot "." +Word "theme" +Return "return" +Word "theme" +RBrace "}" +Function "function" +Word "IndexAccess" +LParen "(" +Word "users" +Word "User" +LBracket "[" +RBracket "]" +RParen ")" +Arrow "->" +Word "string" +LBrace "{" +Slash "/" +Slash "/" +Word "Array" +Word "indexing" +Word "with" +Word "literal" +Let "let" +Word "first" +Equals "=" +Word "users" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Slash "/" +Slash "/" +Word "Array" +Word "indexing" +Word "with" +Word "variable" +Let "let" +Word "idx" +Equals "=" +IntegerLiteral "1" +Let "let" +Word "second" +Equals "=" +Word "users" +LBracket "[" +Word "idx" +RBracket "]" +Slash "/" +Slash "/" +Word "Nested" +Colon ":" +Word "array" +Word "element" +Word "field" +Word "access" +Let "let" +Word "firstName" +Equals "=" +Word "users" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Dot "." +Word "name" +Slash "/" +Slash "/" +Word "Deeply" +Word "nested" +Colon ":" +Word "field" +Word "then" +Word "index" +Word "then" +Word "field" +Let "let" +Word "tag" +Equals "=" +Word "users" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Dot "." +Word "tags" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Return "return" +Word "firstName" +RBrace "}" +Function "function" +Word "MixedAccess" +LParen "(" +Word "user" +Word "User" +RParen ")" +Arrow "->" +Word "string" +LBrace "{" +Slash "/" +Slash "/" +Word "Field" +Word "access" +Word "then" +Word "array" +Word "index" +Let "let" +Word "firstTag" +Equals "=" +Word "user" +Dot "." +Word "tags" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Slash "/" +Slash "/" +Word "Multiple" +Word "indexes" +Let "let" +Word "nestedAccess" +Equals "=" +Word "user" +Dot "." +Word "profile" +Dot "." +Word "settings" +Dot "." +Word "theme" +Return "return" +Word "firstTag" +RBrace "}" diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__index_access.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__index_access.snap new file mode 100644 index 0000000000..4b4791c144 --- /dev/null +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__index_access.snap @@ -0,0 +1,111 @@ +--- +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs +expression: output +--- +Slash "/" +Slash "/" +Word "Test" +Word "index" +Word "access" +Word "expressions" +Class "class" +Word "User" +LBrace "{" +Word "name" +Word "string" +Word "age" +Word "int" +Word "tags" +Word "string" +LBracket "[" +RBracket "]" +RBrace "}" +Function "function" +Word "IndexAccess" +LParen "(" +Word "users" +Word "User" +LBracket "[" +RBracket "]" +RParen ")" +Arrow "->" +Word "string" +LBrace "{" +Slash "/" +Slash "/" +Word "Array" +Word "indexing" +Word "with" +Word "literal" +Let "let" +Word "first" +Equals "=" +Word "users" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Semicolon ";" +Slash "/" +Slash "/" +Word "Array" +Word "indexing" +Word "with" +Word "variable" +Let "let" +Word "idx" +Equals "=" +IntegerLiteral "1" +Semicolon ";" +Let "let" +Word "second" +Equals "=" +Word "users" +LBracket "[" +Word "idx" +RBracket "]" +Semicolon ";" +Slash "/" +Slash "/" +Word "Nested" +Colon ":" +Word "array" +Word "element" +Word "field" +Word "access" +Let "let" +Word "firstName" +Equals "=" +Word "users" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Dot "." +Word "name" +Semicolon ";" +Slash "/" +Slash "/" +Word "Deeply" +Word "nested" +Colon ":" +Word "array" +Word "then" +Word "field" +Word "then" +Word "index" +Let "let" +Word "tag" +Equals "=" +Word "users" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Dot "." +Word "tags" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Semicolon ";" +Return "return" +Word "firstName" +Semicolon ";" +RBrace "}" diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__mixed_field_index_access.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__mixed_field_index_access.snap new file mode 100644 index 0000000000..94c7ec961f --- /dev/null +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__01_lexer__mixed_field_index_access.snap @@ -0,0 +1,89 @@ +--- +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs +expression: output +--- +Slash "/" +Slash "/" +Word "Test" +Word "mixed" +Word "field" +Word "and" +Word "index" +Word "access" +Word "expressions" +Class "class" +Word "User" +LBrace "{" +Word "name" +Word "string" +Word "profile" +Word "Profile" +Word "tags" +Word "string" +LBracket "[" +RBracket "]" +RBrace "}" +Class "class" +Word "Profile" +LBrace "{" +Word "bio" +Word "string" +Word "settings" +Word "Settings" +RBrace "}" +Class "class" +Word "Settings" +LBrace "{" +Word "theme" +Word "string" +RBrace "}" +Function "function" +Word "MixedAccess" +LParen "(" +Word "user" +Word "User" +RParen ")" +Arrow "->" +Word "string" +LBrace "{" +Slash "/" +Slash "/" +Word "Field" +Word "access" +Word "then" +Word "array" +Word "index" +Let "let" +Word "firstTag" +Equals "=" +Word "user" +Dot "." +Word "tags" +LBracket "[" +IntegerLiteral "0" +RBracket "]" +Semicolon ";" +Slash "/" +Slash "/" +Word "Nested" +Word "field" +Word "access" +LParen "(" +For "for" +Word "comparison" +RParen ")" +Let "let" +Word "nestedAccess" +Equals "=" +Word "user" +Dot "." +Word "profile" +Dot "." +Word "settings" +Dot "." +Word "theme" +Semicolon ";" +Return "return" +Word "firstTag" +Semicolon ";" +RBrace "}" diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__field_access.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__field_access.snap new file mode 100644 index 0000000000..1afba04f07 --- /dev/null +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__field_access.snap @@ -0,0 +1,123 @@ +--- +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs +expression: output +--- +=== SYNTAX TREE === +SOURCE_FILE + FUNCTION_DEF + KW_FUNCTION "function" + WORD "FieldAccess" + PARAMETER_LIST + L_PAREN "(" + PARAMETER + WORD "user" + TYPE_EXPR " User" + WORD "User" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + LET_STMT + KW_LET "let" + WORD "name" + EQUALS "=" + PATH_EXPR " user.name" + WORD "user" + DOT "." + WORD "name" + SEMICOLON ";" + LET_STMT + KW_LET "let" + WORD "bio" + EQUALS "=" + PATH_EXPR " user.profile.bio" + WORD "user" + DOT "." + WORD "profile" + DOT "." + WORD "bio" + SEMICOLON ";" + LET_STMT + KW_LET "let" + WORD "theme" + EQUALS "=" + PATH_EXPR " user.profile.settings.theme" + WORD "user" + DOT "." + WORD "profile" + DOT "." + WORD "settings" + DOT "." + WORD "theme" + SEMICOLON ";" + LET_STMT + KW_LET "let" + WORD "firstTag" + EQUALS "=" + INDEX_EXPR + PATH_EXPR " user.tags" + WORD "user" + DOT "." + WORD "tags" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + SEMICOLON ";" + RETURN_STMT " + + return theme" + KW_RETURN "return" + WORD "theme" + SEMICOLON ";" + R_BRACE "}" + CLASS_DEF + KW_CLASS "class" + WORD "User" + L_BRACE "{" + FIELD + WORD "name" + TYPE_EXPR " string" + WORD "string" + FIELD + WORD "profile" + TYPE_EXPR " Profile" + WORD "Profile" + FIELD + WORD "tags" + TYPE_EXPR " string[]" + WORD "string" + L_BRACKET "[" + R_BRACKET "]" + R_BRACE "}" + CLASS_DEF + KW_CLASS "class" + WORD "Profile" + L_BRACE "{" + FIELD + WORD "bio" + TYPE_EXPR " string" + WORD "string" + FIELD + WORD "settings" + TYPE_EXPR " Settings" + WORD "Settings" + R_BRACE "}" + CLASS_DEF + KW_CLASS "class" + WORD "Settings" + L_BRACE "{" + FIELD + WORD "theme" + TYPE_EXPR " string" + WORD "string" + R_BRACE "}" + +=== ERRORS === + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__field_index_access.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__field_index_access.snap new file mode 100644 index 0000000000..4b2701e50a --- /dev/null +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__field_index_access.snap @@ -0,0 +1,230 @@ +--- +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs +expression: output +--- +=== SYNTAX TREE === +SOURCE_FILE + CLASS_DEF + KW_CLASS "class" + WORD "User" + L_BRACE "{" + FIELD + WORD "name" + TYPE_EXPR " string" + WORD "string" + FIELD + WORD "age" + TYPE_EXPR " int" + WORD "int" + FIELD + WORD "profile" + TYPE_EXPR " Profile" + WORD "Profile" + FIELD + WORD "tags" + TYPE_EXPR " string[]" + WORD "string" + L_BRACKET "[" + R_BRACKET "]" + R_BRACE "}" + CLASS_DEF + KW_CLASS "class" + WORD "Profile" + L_BRACE "{" + FIELD + WORD "bio" + TYPE_EXPR " string" + WORD "string" + FIELD + WORD "settings" + TYPE_EXPR " Settings" + WORD "Settings" + R_BRACE "}" + CLASS_DEF + KW_CLASS "class" + WORD "Settings" + L_BRACE "{" + FIELD + WORD "theme" + TYPE_EXPR " string" + WORD "string" + R_BRACE "}" + FUNCTION_DEF + KW_FUNCTION "function" + WORD "FieldAccess" + PARAMETER_LIST + L_PAREN "(" + PARAMETER + WORD "user" + TYPE_EXPR " User" + WORD "User" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + LET_STMT + KW_LET "let" + WORD "name" + EQUALS "=" + PATH_EXPR " user.name" + WORD "user" + DOT "." + WORD "name" + LET_STMT + KW_LET "let" + WORD "bio" + EQUALS "=" + PATH_EXPR " user.profile.bio" + WORD "user" + DOT "." + WORD "profile" + DOT "." + WORD "bio" + LET_STMT + KW_LET "let" + WORD "theme" + EQUALS "=" + PATH_EXPR " user.profile.settings.theme" + WORD "user" + DOT "." + WORD "profile" + DOT "." + WORD "settings" + DOT "." + WORD "theme" + RETURN_STMT " + + return theme" + KW_RETURN "return" + WORD "theme" + R_BRACE "}" + FUNCTION_DEF + KW_FUNCTION "function" + WORD "IndexAccess" + PARAMETER_LIST + L_PAREN "(" + PARAMETER + WORD "users" + TYPE_EXPR " User[]" + WORD "User" + L_BRACKET "[" + R_BRACKET "]" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + LET_STMT + KW_LET "let" + WORD "first" + EQUALS "=" + INDEX_EXPR "users[0]" + WORD "users" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + LET_STMT " + + // Array indexing with variable + let idx = 1" + KW_LET "let" + WORD "idx" + EQUALS "=" + INTEGER_LITERAL "1" + LET_STMT + KW_LET "let" + WORD "second" + EQUALS "=" + INDEX_EXPR "users[idx]" + WORD "users" + L_BRACKET "[" + WORD "idx" + R_BRACKET "]" + LET_STMT + KW_LET "let" + WORD "firstName" + EQUALS "=" + FIELD_ACCESS_EXPR + INDEX_EXPR "users[0]" + WORD "users" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + DOT "." + WORD "name" + LET_STMT + KW_LET "let" + WORD "tag" + EQUALS "=" + INDEX_EXPR + FIELD_ACCESS_EXPR + INDEX_EXPR "users[0]" + WORD "users" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + DOT "." + WORD "tags" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + RETURN_STMT " + + return firstName" + KW_RETURN "return" + WORD "firstName" + R_BRACE "}" + FUNCTION_DEF + KW_FUNCTION "function" + WORD "MixedAccess" + PARAMETER_LIST + L_PAREN "(" + PARAMETER + WORD "user" + TYPE_EXPR " User" + WORD "User" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + LET_STMT + KW_LET "let" + WORD "firstTag" + EQUALS "=" + INDEX_EXPR + PATH_EXPR " user.tags" + WORD "user" + DOT "." + WORD "tags" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + LET_STMT + KW_LET "let" + WORD "nestedAccess" + EQUALS "=" + PATH_EXPR " user.profile.settings.theme" + WORD "user" + DOT "." + WORD "profile" + DOT "." + WORD "settings" + DOT "." + WORD "theme" + RETURN_STMT " + + return firstTag" + KW_RETURN "return" + WORD "firstTag" + R_BRACE "}" + +=== ERRORS === +None diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__if_expressions.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__if_expressions.snap index cceb377e65..b6a12a6e22 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__if_expressions.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__if_expressions.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 2076 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -10,79 +9,59 @@ SOURCE_FILE WORD "ConditionalLogic" PARAMETER_LIST L_PAREN "(" - PARAMETER "age" + PARAMETER WORD "age" - WORD "int" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - KW_IF "if" - WORD "age" - LESS "<" - INTEGER_LITERAL "18" - L_BRACE "{" - KW_RETURN "return" - QUOTE """ - WORD "minor" - QUOTE """ - R_BRACE "}" - KW_ELSE "else" - KW_IF "if" - WORD "age" - LESS "<" - INTEGER_LITERAL "65" - L_BRACE "{" - KW_RETURN "return" - QUOTE """ - WORD "adult" - QUOTE """ - R_BRACE "}" - KW_ELSE "else" - L_BRACE "{" - KW_RETURN "return" - QUOTE """ - WORD "senior" - QUOTE """ - R_BRACE "}" - R_BRACE "}" + TYPE_EXPR " int" + WORD "int" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + IF_EXPR + KW_IF "if" + BINARY_EXPR "age < 18" + WORD "age" + LESS "<" + INTEGER_LITERAL "18" + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + STRING_LITERAL " "minor"" + QUOTE """ + WORD "minor" + QUOTE """ + R_BRACE "}" + KW_ELSE "else" + IF_EXPR + KW_IF "if" + BINARY_EXPR "age < 65" + WORD "age" + LESS "<" + INTEGER_LITERAL "65" + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + STRING_LITERAL " "adult"" + QUOTE """ + WORD "adult" + QUOTE """ + R_BRACE "}" + KW_ELSE "else" + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + STRING_LITERAL " "senior"" + QUOTE """ + WORD "senior" + QUOTE """ + R_BRACE "}" + R_BRACE "}" === ERRORS === - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration +None diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__index_access.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__index_access.snap new file mode 100644 index 0000000000..ef915814c9 --- /dev/null +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__index_access.snap @@ -0,0 +1,117 @@ +--- +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs +expression: output +--- +=== SYNTAX TREE === +SOURCE_FILE + CLASS_DEF + KW_CLASS "class" + WORD "User" + L_BRACE "{" + FIELD + WORD "name" + TYPE_EXPR " string" + WORD "string" + FIELD + WORD "age" + TYPE_EXPR " int" + WORD "int" + FIELD + WORD "tags" + TYPE_EXPR " string[]" + WORD "string" + L_BRACKET "[" + R_BRACKET "]" + R_BRACE "}" + FUNCTION_DEF + KW_FUNCTION "function" + WORD "IndexAccess" + PARAMETER_LIST + L_PAREN "(" + PARAMETER + WORD "users" + TYPE_EXPR " User[]" + WORD "User" + L_BRACKET "[" + R_BRACKET "]" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + LET_STMT + KW_LET "let" + WORD "first" + EQUALS "=" + INDEX_EXPR "users[0]" + WORD "users" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + SEMICOLON ";" + LET_STMT " + + // Array indexing with variable + let idx = 1" + KW_LET "let" + WORD "idx" + EQUALS "=" + INTEGER_LITERAL "1" + SEMICOLON ";" + LET_STMT + KW_LET "let" + WORD "second" + EQUALS "=" + INDEX_EXPR "users[idx]" + WORD "users" + L_BRACKET "[" + WORD "idx" + R_BRACKET "]" + SEMICOLON ";" + LET_STMT + KW_LET "let" + WORD "firstName" + EQUALS "=" + FIELD_ACCESS_EXPR + INDEX_EXPR "users[0]" + WORD "users" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + DOT "." + WORD "name" + SEMICOLON ";" + LET_STMT + KW_LET "let" + WORD "tag" + EQUALS "=" + INDEX_EXPR + FIELD_ACCESS_EXPR + INDEX_EXPR "users[0]" + WORD "users" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + DOT "." + WORD "tags" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + SEMICOLON ";" + RETURN_STMT " + + return firstName" + KW_RETURN "return" + WORD "firstName" + SEMICOLON ";" + R_BRACE "}" + +=== ERRORS === + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__match_expressions.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__match_expressions.snap index e75445788b..30a8db9c44 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__match_expressions.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__match_expressions.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 2103 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -27,198 +26,193 @@ SOURCE_FILE WORD "HandleStatus" PARAMETER_LIST L_PAREN "(" - PARAMETER "status" + PARAMETER WORD "status" - WORD "Status" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - WORD "match" - WORD "status" - L_BRACE "{" - WORD "Status" - DOUBLE_COLON "::" - WORD "PENDING" - EQUALS "=" - GREATER ">" - QUOTE """ - WORD "Waiting" - KW_FOR "for" - WORD "approval" - QUOTE """ - WORD "Status" - DOUBLE_COLON "::" - WORD "ACTIVE" - EQUALS "=" - GREATER ">" - QUOTE """ - WORD "Currently" - WORD "active" - QUOTE """ - WORD "Status" - DOUBLE_COLON "::" - WORD "INACTIVE" - EQUALS "=" - GREATER ">" - QUOTE """ - WORD "Not" - WORD "active" - QUOTE """ - WORD "Status" - DOUBLE_COLON "::" - WORD "SUSPENDED" - EQUALS "=" - GREATER ">" - QUOTE """ - WORD "Temporarily" - WORD "suspended" - QUOTE """ - R_BRACE "}" - R_BRACE "}" + TYPE_EXPR " Status" + WORD "Status" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + WORD "match" + OBJECT_LITERAL + WORD "status" + L_BRACE "{" + OBJECT_FIELD " + Status" + WORD "Status" + DOUBLE_COLON "::" + OBJECT_FIELD "PENDING" + WORD "PENDING" + EQUALS "=" + GREATER ">" + OBJECT_FIELD + STRING_LITERAL " "Waiting for approval"" + QUOTE """ + WORD "Waiting" + KW_FOR "for" + WORD "approval" + QUOTE """ + OBJECT_FIELD " + Status" + WORD "Status" + DOUBLE_COLON "::" + OBJECT_FIELD "ACTIVE" + WORD "ACTIVE" + EQUALS "=" + GREATER ">" + OBJECT_FIELD + STRING_LITERAL " "Currently active"" + QUOTE """ + WORD "Currently" + WORD "active" + QUOTE """ + OBJECT_FIELD " + Status" + WORD "Status" + DOUBLE_COLON "::" + OBJECT_FIELD "INACTIVE" + WORD "INACTIVE" + EQUALS "=" + GREATER ">" + OBJECT_FIELD + STRING_LITERAL " "Not active"" + QUOTE """ + WORD "Not" + WORD "active" + QUOTE """ + OBJECT_FIELD " + Status" + WORD "Status" + DOUBLE_COLON "::" + OBJECT_FIELD "SUSPENDED" + WORD "SUSPENDED" + EQUALS "=" + GREATER ">" + OBJECT_FIELD + STRING_LITERAL " "Temporarily suspended"" + QUOTE """ + WORD "Temporarily" + WORD "suspended" + QUOTE """ + R_BRACE "}" + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "ComplexMatch" PARAMETER_LIST L_PAREN "(" - PARAMETER "value" + PARAMETER WORD "value" - WORD "int" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - WORD "match" - WORD "value" - L_BRACE "{" - INTEGER_LITERAL "0" - EQUALS "=" - GREATER ">" - QUOTE """ - WORD "zero" - QUOTE """ - INTEGER_LITERAL "1" - PIPE "|" - INTEGER_LITERAL "2" - PIPE "|" - INTEGER_LITERAL "3" - EQUALS "=" - GREATER ">" - QUOTE """ - WORD "small" - QUOTE """ - INTEGER_LITERAL "4" - DOT "." - DOT "." - INTEGER_LITERAL "10" - EQUALS "=" - GREATER ">" - QUOTE """ - WORD "medium" - QUOTE """ - WORD "_" - EQUALS "=" - GREATER ">" - QUOTE """ - WORD "large" - QUOTE """ - R_BRACE "}" - R_BRACE "}" + TYPE_EXPR " int" + WORD "int" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + WORD "match" + OBJECT_LITERAL + WORD "value" + L_BRACE "{" + INTEGER_LITERAL "0" + EQUALS "=" + GREATER ">" + OBJECT_FIELD + STRING_LITERAL " "zero"" + QUOTE """ + WORD "zero" + QUOTE """ + INTEGER_LITERAL "1" + PIPE "|" + INTEGER_LITERAL "2" + PIPE "|" + INTEGER_LITERAL "3" + EQUALS "=" + GREATER ">" + OBJECT_FIELD + STRING_LITERAL " "small"" + QUOTE """ + WORD "small" + QUOTE """ + INTEGER_LITERAL "4" + DOT "." + DOT "." + INTEGER_LITERAL "10" + EQUALS "=" + GREATER ">" + OBJECT_FIELD + STRING_LITERAL " "medium"" + QUOTE """ + WORD "medium" + QUOTE """ + OBJECT_FIELD " + _" + WORD "_" + EQUALS "=" + GREATER ">" + OBJECT_FIELD + STRING_LITERAL " "large"" + QUOTE """ + WORD "large" + QUOTE """ + R_BRACE "}" + R_BRACE "}" === ERRORS === - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration + Expected Expected Colon, found DoubleColon, found Expected Colon, found DoubleColon + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected Colon, found Equals, found Expected Colon, found Equals + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected Colon, found Word, found Expected Colon, found Word + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected Colon, found DoubleColon, found Expected Colon, found DoubleColon + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected Colon, found Equals, found Expected Colon, found Equals + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected Colon, found Word, found Expected Colon, found Word + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected Colon, found DoubleColon, found Expected Colon, found DoubleColon + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected Colon, found Equals, found Expected Colon, found Equals + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected Colon, found Word, found Expected Colon, found Word + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected Colon, found DoubleColon, found Expected Colon, found DoubleColon + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected Colon, found Equals, found Expected Colon, found Equals + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected Colon, found RBrace, found Expected Colon, found RBrace + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected Colon, found IntegerLiteral, found Expected Colon, found IntegerLiteral + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected Colon, found IntegerLiteral, found Expected Colon, found IntegerLiteral + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected Colon, found Word, found Expected Colon, found Word + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected Colon, found Equals, found Expected Colon, found Equals + Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + Expected Expected field name or '}', found Expected field name or '}' + Expected Expected Colon, found RBrace, found Expected Colon, found RBrace diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__mixed_field_index_access.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__mixed_field_index_access.snap new file mode 100644 index 0000000000..68efa88d59 --- /dev/null +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__02_parser__mixed_field_index_access.snap @@ -0,0 +1,101 @@ +--- +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs +expression: output +--- +=== SYNTAX TREE === +SOURCE_FILE + CLASS_DEF + KW_CLASS "class" + WORD "User" + L_BRACE "{" + FIELD + WORD "name" + TYPE_EXPR " string" + WORD "string" + FIELD + WORD "profile" + TYPE_EXPR " Profile" + WORD "Profile" + FIELD + WORD "tags" + TYPE_EXPR " string[]" + WORD "string" + L_BRACKET "[" + R_BRACKET "]" + R_BRACE "}" + CLASS_DEF + KW_CLASS "class" + WORD "Profile" + L_BRACE "{" + FIELD + WORD "bio" + TYPE_EXPR " string" + WORD "string" + FIELD + WORD "settings" + TYPE_EXPR " Settings" + WORD "Settings" + R_BRACE "}" + CLASS_DEF + KW_CLASS "class" + WORD "Settings" + L_BRACE "{" + FIELD + WORD "theme" + TYPE_EXPR " string" + WORD "string" + R_BRACE "}" + FUNCTION_DEF + KW_FUNCTION "function" + WORD "MixedAccess" + PARAMETER_LIST + L_PAREN "(" + PARAMETER + WORD "user" + TYPE_EXPR " User" + WORD "User" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + LET_STMT + KW_LET "let" + WORD "firstTag" + EQUALS "=" + INDEX_EXPR + PATH_EXPR " user.tags" + WORD "user" + DOT "." + WORD "tags" + L_BRACKET "[" + INTEGER_LITERAL "0" + R_BRACKET "]" + SEMICOLON ";" + LET_STMT + KW_LET "let" + WORD "nestedAccess" + EQUALS "=" + PATH_EXPR " user.profile.settings.theme" + WORD "user" + DOT "." + WORD "profile" + DOT "." + WORD "settings" + DOT "." + WORD "theme" + SEMICOLON ";" + RETURN_STMT " + + return firstTag" + KW_RETURN "return" + WORD "firstTag" + SEMICOLON ";" + R_BRACE "}" + +=== ERRORS === + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression + Expected Expected expression, found Expected expression diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__03_hir.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__03_hir.snap index 4254c4f0e6..61da74280d 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__03_hir.snap @@ -1,6 +1,211 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +function Calculate { + return: Int + body: Expr { + exprs: [ + Idx::(0): Literal(Int(1)) + Idx::(1): Literal(Int(2)) + Idx::(2): Binary { op: Add, lhs: Idx::(0), rhs: Idx::(1) } + Idx::(3): Path("a") + Idx::(4): Literal(Int(3)) + Idx::(5): Binary { op: Mul, lhs: Idx::(3), rhs: Idx::(4) } + Idx::(6): Path("b") + Idx::(7): Literal(Int(2)) + Idx::(8): Binary { op: Div, lhs: Idx::(6), rhs: Idx::(7) } + Idx::(9): Literal(Int(1)) + Idx::(10): Binary { op: Sub, lhs: Idx::(8), rhs: Idx::(9) } + Idx::(11): Path("a") + Idx::(12): Path("b") + Idx::(13): Binary { op: Add, lhs: Idx::(11), rhs: Idx::(12) } + Idx::(14): Path("c") + Idx::(15): Binary { op: Mul, lhs: Idx::(13), rhs: Idx::(14) } + Idx::(16): Path("d") + Idx::(17): Block { stmts: [Idx::(0), Idx::(1), Idx::(2), Idx::(3), Idx::(4)], tail_expr: None } + ] + stmts: [ + Idx::(0): Let { pattern: Idx::(0), type_annotation: None, initializer: Some(Idx::(2)) } + Idx::(1): Let { pattern: Idx::(1), type_annotation: None, initializer: Some(Idx::(5)) } + Idx::(2): Let { pattern: Idx::(2), type_annotation: None, initializer: Some(Idx::(10)) } + Idx::(3): Let { pattern: Idx::(3), type_annotation: None, initializer: Some(Idx::(15)) } + Idx::(4): Return(Some(Idx::(16))) + ] + root: Idx::(17) + } +} +function FieldAccess { + params: [user: Path(Path { segments: ["User"], kind: Plain })] + return: String + body: Expr { + exprs: [ + Idx::(0): Path("user::name") + Idx::(1): Path("user::profile::bio") + Idx::(2): Path("user::profile::settings::theme") + Idx::(3): Path("user::tags") + Idx::(4): Literal(Int(0)) + Idx::(5): Index { base: Idx::(3), index: Idx::(4) } + Idx::(6): Path("theme") + Idx::(7): Block { stmts: [Idx::(0), Idx::(1), Idx::(2), Idx::(3), Idx::(4)], tail_expr: None } + ] + stmts: [ + Idx::(0): Let { pattern: Idx::(0), type_annotation: None, initializer: Some(Idx::(0)) } + Idx::(1): Let { pattern: Idx::(1), type_annotation: None, initializer: Some(Idx::(1)) } + Idx::(2): Let { pattern: Idx::(2), type_annotation: None, initializer: Some(Idx::(2)) } + Idx::(3): Let { pattern: Idx::(3), type_annotation: None, initializer: Some(Idx::(5)) } + Idx::(4): Return(Some(Idx::(6))) + ] + root: Idx::(7) + } +} +class Settings { + theme: String +} +class User { + name: String + profile: Path(Path { segments: ["Profile"], kind: Plain }) + tags: List(Path(Path { segments: ["string"], kind: Plain })) +} +class Profile { + bio: String + settings: Path(Path { segments: ["Settings"], kind: Plain }) +} +function ConditionalLogic { + params: [age: Int] + return: String + body: Expr { + exprs: [ + Idx::(0): Path("age") + Idx::(1): Literal(Int(18)) + Idx::(2): Binary { op: Lt, lhs: Idx::(0), rhs: Idx::(1) } + Idx::(3): Literal(String(" \"minor\"")) + Idx::(4): Block { stmts: [Idx::(0)], tail_expr: None } + Idx::(5): Path("age") + Idx::(6): Literal(Int(65)) + Idx::(7): Binary { op: Lt, lhs: Idx::(5), rhs: Idx::(6) } + Idx::(8): Literal(String(" \"adult\"")) + Idx::(9): Block { stmts: [Idx::(1)], tail_expr: None } + Idx::(10): Literal(String(" \"senior\"")) + Idx::(11): Block { stmts: [Idx::(2)], tail_expr: None } + Idx::(12): If { condition: Idx::(7), then_branch: Idx::(9), else_branch: Some(Idx::(11)) } + Idx::(13): If { condition: Idx::(2), then_branch: Idx::(4), else_branch: Some(Idx::(12)) } + Idx::(14): Block { stmts: [], tail_expr: Some(Idx::(13)) } + ] + stmts: [ + Idx::(0): Return(Some(Idx::(3))) + Idx::(1): Return(Some(Idx::(8))) + Idx::(2): Return(Some(Idx::(10))) + ] + root: Idx::(14) + } +} +function IndexAccess { + params: [users: List(Path(Path { segments: ["User"], kind: Plain }))] + return: String + body: Expr { + exprs: [ + Idx::(0): Path("users") + Idx::(1): Literal(Int(0)) + Idx::(2): Index { base: Idx::(0), index: Idx::(1) } + Idx::(3): Path("users") + Idx::(4): Path("idx") + Idx::(5): Index { base: Idx::(3), index: Idx::(4) } + Idx::(6): Path("users") + Idx::(7): Literal(Int(0)) + Idx::(8): Index { base: Idx::(6), index: Idx::(7) } + Idx::(9): FieldAccess { base: Idx::(8), field: "name" } + Idx::(10): Path("users") + Idx::(11): Literal(Int(0)) + Idx::(12): Index { base: Idx::(10), index: Idx::(11) } + Idx::(13): FieldAccess { base: Idx::(12), field: "tags" } + Idx::(14): Literal(Int(0)) + Idx::(15): Index { base: Idx::(13), index: Idx::(14) } + Idx::(16): Path("firstName") + Idx::(17): Block { stmts: [Idx::(0), Idx::(1), Idx::(2), Idx::(3), Idx::(4), Idx::(5)], tail_expr: None } + ] + stmts: [ + Idx::(0): Let { pattern: Idx::(0), type_annotation: None, initializer: Some(Idx::(2)) } + Idx::(1): Let { pattern: Idx::(1), type_annotation: None, initializer: None } + Idx::(2): Let { pattern: Idx::(2), type_annotation: None, initializer: Some(Idx::(5)) } + Idx::(3): Let { pattern: Idx::(3), type_annotation: None, initializer: Some(Idx::(9)) } + Idx::(4): Let { pattern: Idx::(4), type_annotation: None, initializer: Some(Idx::(15)) } + Idx::(5): Return(Some(Idx::(16))) + ] + root: Idx::(17) + } +} +class User { + name: String + age: Int + tags: List(Path(Path { segments: ["string"], kind: Plain })) +} +function HandleStatus { + params: [status: Path(Path { segments: ["Status"], kind: Plain })] + return: String + body: Expr { + exprs: [ + Idx::(0): Missing + Idx::(1): Missing + Idx::(2): Missing + Idx::(3): Missing + Idx::(4): Missing + Idx::(5): Missing + Idx::(6): Missing + Idx::(7): Missing + Idx::(8): Object { type_name: Some("status"), fields: [("Status", Idx::(0)), ("PENDING", Idx::(1)), ("Status", Idx::(2)), ("ACTIVE", Idx::(3)), ("Status", Idx::(4)), ("INACTIVE", Idx::(5)), ("Status", Idx::(6)), ("SUSPENDED", Idx::(7))] } + Idx::(9): Block { stmts: [], tail_expr: Some(Idx::(8)) } + ] + root: Idx::(9) + } +} +function ComplexMatch { + params: [value: Int] + return: String + body: Expr { + exprs: [ + Idx::(0): Missing + Idx::(1): Object { type_name: Some("value"), fields: [("_", Idx::(0))] } + Idx::(2): Block { stmts: [], tail_expr: Some(Idx::(1)) } + ] + root: Idx::(2) + } +} +enum Status { + EnumVariant { name: "PENDING" } + EnumVariant { name: "ACTIVE" } + EnumVariant { name: "INACTIVE" } + EnumVariant { name: "SUSPENDED" } +} +function TestPrecedence { + return: Bool + body: Expr { + exprs: [ + Idx::(0): Literal(Int(2)) + Idx::(1): Literal(Int(3)) + Idx::(2): Literal(Int(4)) + Idx::(3): Binary { op: Mul, lhs: Idx::(1), rhs: Idx::(2) } + Idx::(4): Binary { op: Add, lhs: Idx::(0), rhs: Idx::(3) } + Idx::(5): Path("a") + Idx::(6): Literal(Int(10)) + Idx::(7): Literal(Int(2)) + Idx::(8): Binary { op: Add, lhs: Idx::(6), rhs: Idx::(7) } + Idx::(9): Binary { op: Gt, lhs: Idx::(5), rhs: Idx::(8) } + Idx::(10): Literal(Bool(true)) + Idx::(11): Literal(Bool(false)) + Idx::(12): Literal(Bool(false)) + Idx::(13): Binary { op: And, lhs: Idx::(11), rhs: Idx::(12) } + Idx::(14): Binary { op: Or, lhs: Idx::(10), rhs: Idx::(13) } + Idx::(15): Path("c") + Idx::(16): Block { stmts: [Idx::(0), Idx::(1), Idx::(2), Idx::(3)], tail_expr: None } + ] + stmts: [ + Idx::(0): Let { pattern: Idx::(0), type_annotation: None, initializer: Some(Idx::(4)) } + Idx::(1): Let { pattern: Idx::(1), type_annotation: None, initializer: Some(Idx::(9)) } + Idx::(2): Let { pattern: Idx::(2), type_annotation: None, initializer: Some(Idx::(14)) } + Idx::(3): Return(Some(Idx::(15))) + ] + root: Idx::(16) + } +} diff --git a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__05_diagnostics.snap b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__05_diagnostics.snap index 1c5fcde44a..e82df469b2 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__05_diagnostics.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_expressions/baml_tests__parser_expressions__05_diagnostics.snap @@ -1,140 +1,67 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 2318 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === DIAGNOSTICS === - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected expression, found Expected expression + [parse] Expected Expected Colon, found DoubleColon, found Expected Colon, found DoubleColon + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected Colon, found Equals, found Expected Colon, found Equals + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected Colon, found Word, found Expected Colon, found Word + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected Colon, found DoubleColon, found Expected Colon, found DoubleColon + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected Colon, found Equals, found Expected Colon, found Equals + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected Colon, found Word, found Expected Colon, found Word + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected Colon, found DoubleColon, found Expected Colon, found DoubleColon + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected Colon, found Equals, found Expected Colon, found Equals + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected Colon, found Word, found Expected Colon, found Word + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected Colon, found DoubleColon, found Expected Colon, found DoubleColon + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected Colon, found Equals, found Expected Colon, found Equals + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected Colon, found RBrace, found Expected Colon, found RBrace + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected Colon, found IntegerLiteral, found Expected Colon, found IntegerLiteral + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected Colon, found IntegerLiteral, found Expected Colon, found IntegerLiteral + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected Colon, found Word, found Expected Colon, found Word + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected Colon, found Equals, found Expected Colon, found Equals + [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field + [parse] Expected Expected field name or '}', found Expected field name or '}' + [parse] Expected Expected Colon, found RBrace, found Expected Colon, found RBrace diff --git a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__ambiguous_function.snap b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__ambiguous_function.snap index e80aeb1a9f..6c9b2da0ac 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__ambiguous_function.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__ambiguous_function.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 2721 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -10,75 +9,53 @@ SOURCE_FILE WORD "Ambiguous" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " - client GPT4" - KW_CLIENT "client" - WORD "GPT4" - R_BRACE "}" + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR " { + client GPT4 // This keyword determines it's an LLM function + // Even though it starts like it could be expression function +}" + L_BRACE "{" + KW_CLIENT "client" + WORD "GPT4" + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "AnotherLLM" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - WORD "clent" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + WORD "clent" + WORD "GPT4" + WORD "prompt" + STRING_LITERAL " "Process: {{ input }}"" + QUOTE """ + WORD "Process" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" === ERRORS === - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration + Expected Expected expression, found Expected expression diff --git a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__expr_function.snap b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__expr_function.snap index e80d4fa540..d06fd98fc5 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__expr_function.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__expr_function.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 2748 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -23,71 +22,53 @@ SOURCE_FILE WORD "ProcessData" PARAMETER_LIST L_PAREN "(" - PARAMETER "data" + PARAMETER WORD "data" - WORD "JsonData" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - KW_LET "let" - WORD "result" - EQUALS "=" - WORD "data" - DOT "." - WORD "field1" - PLUS "+" - WORD "data" - DOT "." - WORD "field2" - KW_IF "if" - WORD "result" - GREATER ">" - INTEGER_LITERAL "100" - L_BRACE "{" - KW_RETURN "return" - QUOTE """ - WORD "high" - QUOTE """ - R_BRACE "}" - KW_RETURN "return" - QUOTE """ - WORD "low" - QUOTE """ - R_BRACE "}" + TYPE_EXPR " JsonData" + WORD "JsonData" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + LET_STMT + KW_LET "let" + WORD "result" + EQUALS "=" + BINARY_EXPR + PATH_EXPR " data.field1" + WORD "data" + DOT "." + WORD "field1" + PLUS "+" + PATH_EXPR " data.field2" + WORD "data" + DOT "." + WORD "field2" + IF_EXPR + KW_IF "if" + BINARY_EXPR "result > 100" + WORD "result" + GREATER ">" + INTEGER_LITERAL "100" + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + STRING_LITERAL " "high"" + QUOTE """ + WORD "high" + QUOTE """ + R_BRACE "}" + RETURN_STMT + KW_RETURN "return" + STRING_LITERAL " "low"" + QUOTE """ + WORD "low" + QUOTE """ + R_BRACE "}" === ERRORS === - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration +None diff --git a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__llm_function.snap b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__llm_function.snap index e6e6b275fe..53fd2807e6 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__llm_function.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__llm_function.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 2775 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -10,66 +9,45 @@ SOURCE_FILE WORD "ExtractData" PARAMETER_LIST L_PAREN "(" - PARAMETER "text" + PARAMETER WORD "text" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "JsonData" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " JsonData" + WORD "JsonData" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - HASH "#" - QUOTE """ - WORD "Extract" - WORD "structured" - WORD "data" - WORD "from" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "text" - R_BRACE "}" - R_BRACE "}" - WORD "Return" - WORD "as" - WORD "JSON" - DOT "." - QUOTE """ - HASH "#" - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + RAW_STRING_LITERAL " #" + Extract structured data from: {{ text }} + Return as JSON. + "#" + HASH "#" + QUOTE """ + WORD "Extract" + WORD "structured" + WORD "data" + WORD "from" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "text" + R_BRACE "}" + R_BRACE "}" + WORD "Return" + WORD "as" + WORD "JSON" + DOT "." + QUOTE """ + HASH "#" + R_BRACE "}" === ERRORS === - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration +None diff --git a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__mixed_functions.snap b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__mixed_functions.snap index 962041313d..2d1be43b48 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__mixed_functions.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__02_parser__mixed_functions.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 2802 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -10,42 +9,52 @@ SOURCE_FILE WORD "LLMAnalyze" PARAMETER_LIST L_PAREN "(" - PARAMETER "text" + PARAMETER WORD "text" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "Analysis" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " Analysis" + WORD "Analysis" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - HASH "#" - QUOTE """ - WORD "Analyze" - WORD "the" - WORD "following" - WORD "text" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "text" - R_BRACE "}" - R_BRACE "}" - WORD "Return" - WORD "an" - WORD "Analysis" - WORD "object" - WORD "with" - WORD "sentiment" - WORD "and" - WORD "keywords" - DOT "." - QUOTE """ - HASH "#" - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + RAW_STRING_LITERAL " #" + Analyze the following text: + {{ text }} + + Return an Analysis object with sentiment and keywords. + "#" + HASH "#" + QUOTE """ + WORD "Analyze" + WORD "the" + WORD "following" + WORD "text" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "text" + R_BRACE "}" + R_BRACE "}" + WORD "Return" + WORD "an" + WORD "Analysis" + WORD "object" + WORD "with" + WORD "sentiment" + WORD "and" + WORD "keywords" + DOT "." + QUOTE """ + HASH "#" + R_BRACE "}" CLASS_DEF KW_CLASS "class" WORD "Analysis" @@ -70,311 +79,196 @@ SOURCE_FILE WORD "ProcessAnalysis" PARAMETER_LIST L_PAREN "(" - PARAMETER "analysis" + PARAMETER WORD "analysis" - WORD "Analysis" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - KW_LET "let" - WORD "score" - EQUALS "=" - WORD "analysis" - DOT "." - WORD "score" - KW_IF "if" - WORD "score" - GREATER ">" - FLOAT_LITERAL "0.8" - L_BRACE "{" - KW_RETURN "return" - QUOTE """ - WORD "Very" - WORD "positive" - COLON ":" - QUOTE """ - PLUS "+" - WORD "analysis" - DOT "." - WORD "sentiment" - R_BRACE "}" - KW_ELSE "else" - KW_IF "if" - WORD "score" - GREATER ">" - FLOAT_LITERAL "0.5" - L_BRACE "{" - KW_RETURN "return" - QUOTE """ - WORD "Positive" - COLON ":" - QUOTE """ - PLUS "+" - WORD "analysis" - DOT "." - WORD "sentiment" - R_BRACE "}" - KW_ELSE "else" - KW_IF "if" - WORD "score" - GREATER ">" - FLOAT_LITERAL "0.2" - L_BRACE "{" - KW_RETURN "return" - QUOTE """ - WORD "Neutral" - COLON ":" - QUOTE """ - PLUS "+" - WORD "analysis" - DOT "." - WORD "sentiment" - R_BRACE "}" - KW_ELSE "else" - L_BRACE "{" - KW_RETURN "return" - QUOTE """ - WORD "Negative" - COLON ":" - QUOTE """ - PLUS "+" - WORD "analysis" - DOT "." - WORD "sentiment" - R_BRACE "}" - R_BRACE "}" + TYPE_EXPR " Analysis" + WORD "Analysis" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + LET_STMT + KW_LET "let" + WORD "score" + EQUALS "=" + PATH_EXPR " analysis.score" + WORD "analysis" + DOT "." + WORD "score" + IF_EXPR + KW_IF "if" + BINARY_EXPR "score > 0.8" + WORD "score" + GREATER ">" + FLOAT_LITERAL "0.8" + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + BINARY_EXPR + STRING_LITERAL " "Very positive: "" + QUOTE """ + WORD "Very" + WORD "positive" + COLON ":" + QUOTE """ + PLUS "+" + PATH_EXPR " analysis.sentiment" + WORD "analysis" + DOT "." + WORD "sentiment" + R_BRACE "}" + KW_ELSE "else" + IF_EXPR + KW_IF "if" + BINARY_EXPR "score > 0.5" + WORD "score" + GREATER ">" + FLOAT_LITERAL "0.5" + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + BINARY_EXPR + STRING_LITERAL " "Positive: "" + QUOTE """ + WORD "Positive" + COLON ":" + QUOTE """ + PLUS "+" + PATH_EXPR " analysis.sentiment" + WORD "analysis" + DOT "." + WORD "sentiment" + R_BRACE "}" + KW_ELSE "else" + IF_EXPR + KW_IF "if" + BINARY_EXPR "score > 0.2" + WORD "score" + GREATER ">" + FLOAT_LITERAL "0.2" + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + BINARY_EXPR + STRING_LITERAL " "Neutral: "" + QUOTE """ + WORD "Neutral" + COLON ":" + QUOTE """ + PLUS "+" + PATH_EXPR " analysis.sentiment" + WORD "analysis" + DOT "." + WORD "sentiment" + R_BRACE "}" + KW_ELSE "else" + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + BINARY_EXPR + STRING_LITERAL " "Negative: "" + QUOTE """ + WORD "Negative" + COLON ":" + QUOTE """ + PLUS "+" + PATH_EXPR " analysis.sentiment" + WORD "analysis" + DOT "." + WORD "sentiment" + R_BRACE "}" + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "ChainedProcess" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - HASH "#" - QUOTE """ - WORD "Process" - WORD "this" - WORD "through" - WORD "multiple" - WORD "steps" - COLON ":" - INTEGER_LITERAL "1" - DOT "." - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - INTEGER_LITERAL "2" - DOT "." - WORD "Transform" - WORD "it" - INTEGER_LITERAL "3" - DOT "." - WORD "Return" - WORD "result" - QUOTE """ - HASH "#" - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + RAW_STRING_LITERAL " #" + Process this through multiple steps: + 1. {{ input }} + 2. Transform it + 3. Return result + "#" + HASH "#" + QUOTE """ + WORD "Process" + WORD "this" + WORD "through" + WORD "multiple" + WORD "steps" + COLON ":" + INTEGER_LITERAL "1" + DOT "." + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + INTEGER_LITERAL "2" + DOT "." + WORD "Transform" + WORD "it" + INTEGER_LITERAL "3" + DOT "." + WORD "Return" + WORD "result" + QUOTE """ + HASH "#" + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "SimpleCalc" PARAMETER_LIST L_PAREN "(" - PARAMETER "a" + PARAMETER WORD "a" - WORD "int" - COMMA "," - WORD "b" - WORD "int" - R_PAREN ")" - ARROW "->" - WORD "int" - L_BRACE "{" - KW_RETURN "return" - WORD "a" - PLUS "+" - WORD "b" - STAR "*" - INTEGER_LITERAL "2" - R_BRACE "}" + TYPE_EXPR " int" + WORD "int" + COMMA "," + PARAMETER + WORD "b" + TYPE_EXPR " int" + WORD "int" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " int" + WORD "int" + EXPR_FUNCTION_BODY + BLOCK_EXPR + L_BRACE "{" + RETURN_STMT + KW_RETURN "return" + BINARY_EXPR + WORD "a" + PLUS "+" + BINARY_EXPR "b * 2" + WORD "b" + STAR "*" + INTEGER_LITERAL "2" + R_BRACE "}" === ERRORS === - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration +None diff --git a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__03_hir.snap b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__03_hir.snap index 4254c4f0e6..b231b282cc 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__03_hir.snap @@ -1,6 +1,151 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +function Ambiguous { + params: [input: String] + return: String + body: Expr { + exprs: [ + Idx::(0): Block { stmts: [], tail_expr: None } + ] + root: Idx::(0) + } +} +function AnotherLLM { + params: [input: String] + return: String + body: Expr { + exprs: [ + Idx::(0): Block { stmts: [], tail_expr: None } + ] + root: Idx::(0) + } +} +function ProcessData { + params: [data: Path(Path { segments: ["JsonData"], kind: Plain })] + return: String + body: Expr { + exprs: [ + Idx::(0): Path("data::field1") + Idx::(1): Path("data::field2") + Idx::(2): Binary { op: Add, lhs: Idx::(0), rhs: Idx::(1) } + Idx::(3): Path("result") + Idx::(4): Literal(Int(100)) + Idx::(5): Binary { op: Gt, lhs: Idx::(3), rhs: Idx::(4) } + Idx::(6): Literal(String(" \"high\"")) + Idx::(7): Block { stmts: [Idx::(1)], tail_expr: None } + Idx::(8): If { condition: Idx::(5), then_branch: Idx::(7), else_branch: None } + Idx::(9): Literal(String(" \"low\"")) + Idx::(10): Block { stmts: [Idx::(0), Idx::(2), Idx::(3)], tail_expr: None } + ] + stmts: [ + Idx::(0): Let { pattern: Idx::(0), type_annotation: None, initializer: Some(Idx::(2)) } + Idx::(1): Return(Some(Idx::(6))) + Idx::(2): Expr(Idx::(8)) + Idx::(3): Return(Some(Idx::(9))) + ] + root: Idx::(10) + } +} +class JsonData { + field1: Int + field2: Int +} +function ExtractData { + params: [text: String] + return: Path(Path { segments: ["JsonData"], kind: Plain }) + body: Llm { + client: GPT4 + prompt: "\n Extract structured data from: {{ text }}\n Return as JSON.\n " + interpolations: [text] + } +} +function ProcessAnalysis { + params: [analysis: Path(Path { segments: ["Analysis"], kind: Plain })] + return: String + body: Expr { + exprs: [ + Idx::(0): Path("analysis::score") + Idx::(1): Path("score") + Idx::(2): Literal(Float("0.8")) + Idx::(3): Binary { op: Gt, lhs: Idx::(1), rhs: Idx::(2) } + Idx::(4): Literal(String(" \"Very positive: \"")) + Idx::(5): Path("analysis::sentiment") + Idx::(6): Binary { op: Add, lhs: Idx::(4), rhs: Idx::(5) } + Idx::(7): Block { stmts: [Idx::(1)], tail_expr: None } + Idx::(8): Path("score") + Idx::(9): Literal(Float("0.5")) + Idx::(10): Binary { op: Gt, lhs: Idx::(8), rhs: Idx::(9) } + Idx::(11): Literal(String(" \"Positive: \"")) + Idx::(12): Path("analysis::sentiment") + Idx::(13): Binary { op: Add, lhs: Idx::(11), rhs: Idx::(12) } + Idx::(14): Block { stmts: [Idx::(2)], tail_expr: None } + Idx::(15): Path("score") + Idx::(16): Literal(Float("0.2")) + Idx::(17): Binary { op: Gt, lhs: Idx::(15), rhs: Idx::(16) } + Idx::(18): Literal(String(" \"Neutral: \"")) + Idx::(19): Path("analysis::sentiment") + Idx::(20): Binary { op: Add, lhs: Idx::(18), rhs: Idx::(19) } + Idx::(21): Block { stmts: [Idx::(3)], tail_expr: None } + Idx::(22): Literal(String(" \"Negative: \"")) + Idx::(23): Path("analysis::sentiment") + Idx::(24): Binary { op: Add, lhs: Idx::(22), rhs: Idx::(23) } + Idx::(25): Block { stmts: [Idx::(4)], tail_expr: None } + Idx::(26): If { condition: Idx::(17), then_branch: Idx::(21), else_branch: Some(Idx::(25)) } + Idx::(27): If { condition: Idx::(10), then_branch: Idx::(14), else_branch: Some(Idx::(26)) } + Idx::(28): If { condition: Idx::(3), then_branch: Idx::(7), else_branch: Some(Idx::(27)) } + Idx::(29): Block { stmts: [Idx::(0)], tail_expr: Some(Idx::(28)) } + ] + stmts: [ + Idx::(0): Let { pattern: Idx::(0), type_annotation: None, initializer: Some(Idx::(0)) } + Idx::(1): Return(Some(Idx::(6))) + Idx::(2): Return(Some(Idx::(13))) + Idx::(3): Return(Some(Idx::(20))) + Idx::(4): Return(Some(Idx::(24))) + ] + root: Idx::(29) + } +} +function ChainedProcess { + params: [input: String] + return: String + body: Llm { + client: GPT4 + prompt: "\n Process this through multiple steps:\n 1. {{ input }}\n 2. Transform it\n 3. Return result\n " + interpolations: [input] + } +} +function LLMAnalyze { + params: [text: String] + return: Path(Path { segments: ["Analysis"], kind: Plain }) + body: Llm { + client: GPT4 + prompt: "\n Analyze the following text:\n {{ text }}\n \n Return an Analysis object with sentiment and keywords.\n " + interpolations: [text] + } +} +function SimpleCalc { + params: [a: Int, b: Int] + return: Int + body: Expr { + exprs: [ + Idx::(0): Path("a") + Idx::(1): Path("b") + Idx::(2): Literal(Int(2)) + Idx::(3): Binary { op: Mul, lhs: Idx::(1), rhs: Idx::(2) } + Idx::(4): Binary { op: Add, lhs: Idx::(0), rhs: Idx::(3) } + Idx::(5): Block { stmts: [Idx::(0)], tail_expr: None } + ] + stmts: [ + Idx::(0): Return(Some(Idx::(4))) + ] + root: Idx::(5) + } +} +class Analysis { + sentiment: String + keywords: List(Path(Path { segments: ["string"], kind: Plain })) + score: Float +} diff --git a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__05_diagnostics.snap b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__05_diagnostics.snap index 519985522d..aa1e4546c3 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__05_diagnostics.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_speculative/baml_tests__parser_speculative__05_diagnostics.snap @@ -1,269 +1,6 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === DIAGNOSTICS === - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration + [parse] Expected Expected expression, found Expected expression diff --git a/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__02_parser__large_file.snap b/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__02_parser__large_file.snap index ee94532ce2..f92438a320 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__02_parser__large_file.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__02_parser__large_file.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 3422 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -41410,5200 +41409,3401 @@ SOURCE_FILE WORD "Process1" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "1" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 1: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "1" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process2" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "2" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 2: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "2" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process3" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "3" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 3: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "3" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process4" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "4" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 4: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "4" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process5" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "5" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 5: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "5" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process6" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "6" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 6: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "6" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process7" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "7" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 7: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "7" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process8" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "8" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 8: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "8" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process9" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "9" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 9: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "9" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process10" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "10" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 10: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "10" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process11" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "11" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 11: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "11" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process12" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "12" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 12: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "12" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process13" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "13" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 13: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "13" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process14" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "14" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 14: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "14" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process15" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "15" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 15: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "15" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process16" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "16" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 16: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "16" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process17" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "17" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 17: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "17" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process18" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "18" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 18: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "18" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process19" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "19" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 19: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "19" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process20" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "20" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 20: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "20" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process21" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "21" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 21: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "21" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process22" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "22" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 22: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "22" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process23" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "23" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 23: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "23" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process24" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "24" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 24: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "24" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process25" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "25" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 25: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "25" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process26" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "26" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 26: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "26" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process27" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "27" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 27: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "27" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process28" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "28" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 28: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "28" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process29" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "29" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 29: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "29" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process30" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "30" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 30: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "30" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process31" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "31" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 31: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "31" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process32" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "32" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 32: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "32" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process33" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "33" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 33: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "33" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process34" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "34" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 34: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "34" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process35" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "35" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 35: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "35" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process36" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "36" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 36: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "36" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process37" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "37" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 37: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "37" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process38" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "38" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 38: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "38" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process39" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "39" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 39: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "39" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process40" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "40" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 40: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "40" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process41" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "41" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 41: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "41" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process42" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "42" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 42: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "42" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process43" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "43" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 43: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "43" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process44" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "44" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 44: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "44" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process45" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "45" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 45: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "45" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process46" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "46" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 46: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "46" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process47" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "47" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 47: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "47" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process48" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "48" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 48: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "48" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process49" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "49" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 49: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "49" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process50" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "50" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 50: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "50" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process51" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "51" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 51: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "51" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process52" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "52" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 52: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "52" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process53" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "53" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 53: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "53" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process54" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "54" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 54: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "54" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process55" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "55" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 55: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "55" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process56" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "56" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 56: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "56" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process57" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "57" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 57: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "57" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process58" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "58" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 58: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "58" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process59" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "59" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 59: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "59" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process60" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "60" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 60: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "60" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process61" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "61" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 61: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "61" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process62" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "62" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 62: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "62" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process63" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "63" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 63: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "63" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process64" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "64" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 64: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "64" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process65" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "65" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 65: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "65" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process66" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "66" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 66: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "66" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process67" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "67" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 67: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "67" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process68" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "68" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 68: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "68" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process69" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "69" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 69: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "69" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process70" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "70" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 70: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "70" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process71" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "71" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 71: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "71" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process72" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "72" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 72: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "72" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process73" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "73" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 73: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "73" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process74" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "74" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 74: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "74" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process75" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "75" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 75: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "75" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process76" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "76" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 76: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "76" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process77" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "77" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 77: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "77" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process78" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "78" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 78: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "78" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process79" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "79" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 79: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "79" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process80" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "80" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 80: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "80" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process81" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "81" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 81: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "81" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process82" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "82" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 82: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "82" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process83" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "83" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 83: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "83" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process84" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "84" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 84: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "84" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process85" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "85" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 85: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "85" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process86" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "86" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 86: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "86" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process87" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "87" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 87: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "87" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process88" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "88" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 88: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "88" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process89" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "89" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 89: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "89" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process90" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "90" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 90: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "90" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process91" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "91" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 91: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "91" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process92" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "92" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 92: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "92" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process93" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "93" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 93: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "93" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process94" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "94" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 94: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "94" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process95" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "95" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 95: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "95" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process96" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "96" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 96: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "96" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process97" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "97" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 97: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "97" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process98" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "98" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 98: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "98" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process99" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "99" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 99: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "99" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" FUNCTION_DEF KW_FUNCTION "function" WORD "Process100" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - QUOTE """ - WORD "Process" - WORD "input" - INTEGER_LITERAL "100" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + STRING_LITERAL " "Process input 100: {{ input }}"" + QUOTE """ + WORD "Process" + WORD "input" + INTEGER_LITERAL "100" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + R_BRACE "}" === ERRORS === - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration +None diff --git a/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__02_parser__very_invalid.snap b/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__02_parser__very_invalid.snap index 168ac91272..ac41b0426b 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__02_parser__very_invalid.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__02_parser__very_invalid.snap @@ -1,5 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -25,14 +25,13 @@ SOURCE_FILE SEMICOLON ";" WHILE_STMT KW_WHILE "while" - OBJECT_LITERAL - ERROR_TOKEN "\" + ERROR_TOKEN "\" + BLOCK_EXPR L_BRACE "{" - OBJECT_FIELD " - x" + BINARY_EXPR "x += 1" WORD "x" - PLUS_EQUALS "+=" - INTEGER_LITERAL "1" + PLUS_EQUALS "+=" + INTEGER_LITERAL "1" SEMICOLON ";" R_BRACE "}" R_BRACE "}" @@ -41,8 +40,3 @@ SOURCE_FILE Expected Expected expression, found Expected expression Expected Expected expression, found Expected expression Expected Expected expression, found Expected expression - Expected Expected Colon, found PlusEquals, found Expected Colon, found PlusEquals - Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field - Expected Expected field name or '}', found Expected field name or '}' - Expected Expected field name or '}', found Expected field name or '}' - Expected Expected block after while condition, found Expected block after while condition diff --git a/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__03_hir.snap b/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__03_hir.snap index 4254c4f0e6..3ecbbc6f13 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__03_hir.snap @@ -1,6 +1,6296 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +class StringTorture { + raw1: String + raw2: String + raw3: String + emoji: String + rtl: String + zalgo: String + long: String +} +function DeepExpression { + return: Int + body: Expr { + exprs: [ + Idx::(0): Literal(Int(1)) + Idx::(1): Literal(Int(2)) + Idx::(2): Binary { op: Add, lhs: Idx::(0), rhs: Idx::(1) } + Idx::(3): Literal(Int(3)) + Idx::(4): Binary { op: Mul, lhs: Idx::(2), rhs: Idx::(3) } + Idx::(5): Literal(Int(4)) + Idx::(6): Binary { op: Sub, lhs: Idx::(4), rhs: Idx::(5) } + Idx::(7): Literal(Int(5)) + Idx::(8): Binary { op: Div, lhs: Idx::(6), rhs: Idx::(7) } + Idx::(9): Literal(Int(6)) + Idx::(10): Binary { op: Add, lhs: Idx::(8), rhs: Idx::(9) } + Idx::(11): Literal(Int(7)) + Idx::(12): Binary { op: Mul, lhs: Idx::(10), rhs: Idx::(11) } + Idx::(13): Literal(Int(8)) + Idx::(14): Binary { op: Sub, lhs: Idx::(12), rhs: Idx::(13) } + Idx::(15): Literal(Int(9)) + Idx::(16): Binary { op: Div, lhs: Idx::(14), rhs: Idx::(15) } + Idx::(17): Literal(Int(10)) + Idx::(18): Binary { op: Add, lhs: Idx::(16), rhs: Idx::(17) } + Idx::(19): Block { stmts: [Idx::(0)], tail_expr: None } + ] + stmts: [ + Idx::(0): Return(Some(Idx::(18))) + ] + root: Idx::(19) + } +} +function ComplexType { + return: Optional(Path(Path { segments: ["map(0): Block { stmts: [Idx::(0)], tail_expr: None } + ] + stmts: [ + Idx::(0): Let { pattern: Idx::(0), type_annotation: None, initializer: None } + ] + root: Idx::(0) + } +} diff --git a/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__05_diagnostics.snap b/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__05_diagnostics.snap index 2a7dc58d9c..67f71edb17 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__05_diagnostics.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_stress/baml_tests__parser_stress__05_diagnostics.snap @@ -1,5 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === DIAGNOSTICS === @@ -14,2306 +14,6 @@ expression: output [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected top-level declaration, found Expected top-level declaration @@ -3706,8 +1406,3 @@ expression: output [parse] Expected Expected expression, found Expected expression [parse] Expected Expected expression, found Expected expression [parse] Expected Expected expression, found Expected expression - [parse] Expected Expected Colon, found PlusEquals, found Expected Colon, found PlusEquals - [parse] Expected Expected ',' or '}' after object field, found Expected ',' or '}' after object field - [parse] Expected Expected field name or '}', found Expected field name or '}' - [parse] Expected Expected field name or '}', found Expected field name or '}' - [parse] Expected Expected block after while condition, found Expected block after while condition diff --git a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__nested_quotes.snap b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__nested_quotes.snap index febaf9a207..5eea0edac0 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__nested_quotes.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__nested_quotes.snap @@ -1,6 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs -assertion_line: 3927 +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -136,50 +135,58 @@ SOURCE_FILE WORD "FormatMessage" PARAMETER_LIST L_PAREN "(" - PARAMETER "name" + PARAMETER WORD "name" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - HASH "#" - QUOTE """ - WORD "Generate" - WORD "a" - WORD "message" - KW_FOR "for" - QUOTE """ - L_BRACE "{" - L_BRACE "{" - WORD "name" - R_BRACE "}" - R_BRACE "}" - QUOTE """ - WORD "Include" - WORD "quotes" - WORD "like" - COLON ":" - QUOTE """ - WORD "Welcome" - COMMA "," - ERROR_TOKEN "'" - L_BRACE "{" - L_BRACE "{" - WORD "name" - R_BRACE "}" - R_BRACE "}" - ERROR_TOKEN "'" - NOT "!" - QUOTE """ - QUOTE """ - HASH "#" - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + RAW_STRING_LITERAL " #" + Generate a message for "{{ name }}" + Include quotes like: "Welcome, '{{ name }}'!" + "#" + HASH "#" + QUOTE """ + WORD "Generate" + WORD "a" + WORD "message" + KW_FOR "for" + QUOTE """ + L_BRACE "{" + L_BRACE "{" + WORD "name" + R_BRACE "}" + R_BRACE "}" + QUOTE """ + WORD "Include" + WORD "quotes" + WORD "like" + COLON ":" + QUOTE """ + WORD "Welcome" + COMMA "," + ERROR_TOKEN "'" + L_BRACE "{" + L_BRACE "{" + WORD "name" + R_BRACE "}" + R_BRACE "}" + ERROR_TOKEN "'" + NOT "!" + QUOTE """ + QUOTE """ + HASH "#" + R_BRACE "}" === ERRORS === Expected Expected attribute argument, found Expected attribute argument @@ -216,46 +223,3 @@ SOURCE_FILE Expected Expected top-level declaration, found Expected top-level declaration Expected Expected top-level declaration, found Expected top-level declaration Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration diff --git a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__raw_strings.snap b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__raw_strings.snap index 4fcaa0ded9..46a45372ce 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__raw_strings.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__raw_strings.snap @@ -1,5 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -112,68 +112,48 @@ SOURCE_FILE WORD "ProcessText" PARAMETER_LIST L_PAREN "(" - PARAMETER "input" + PARAMETER WORD "input" - WORD "string" - R_PAREN ")" - ARROW "->" - WORD "string" - L_BRACE "{" - CLIENT_DEF " + TYPE_EXPR " string" + WORD "string" + R_PAREN ")" + ARROW "->" + TYPE_EXPR " string" + WORD "string" + LLM_FUNCTION_BODY + L_BRACE "{" + CLIENT_FIELD " client GPT4" - KW_CLIENT "client" - WORD "GPT4" - WORD "prompt" - HASH "#" - QUOTE """ - WORD "Process" - WORD "the" - WORD "following" - WORD "text" - COLON ":" - L_BRACE "{" - L_BRACE "{" - WORD "input" - R_BRACE "}" - R_BRACE "}" - WORD "Return" - WORD "the" - WORD "processed" - WORD "result" - DOT "." - QUOTE """ - HASH "#" - R_BRACE "}" + KW_CLIENT "client" + WORD "GPT4" + PROMPT_FIELD + WORD "prompt" + RAW_STRING_LITERAL " #" + Process the following text: + {{ input }} + + Return the processed result. + "#" + HASH "#" + QUOTE """ + WORD "Process" + WORD "the" + WORD "following" + WORD "text" + COLON ":" + L_BRACE "{" + L_BRACE "{" + WORD "input" + R_BRACE "}" + R_BRACE "}" + WORD "Return" + WORD "the" + WORD "processed" + WORD "result" + DOT "." + QUOTE """ + HASH "#" + R_BRACE "}" === ERRORS === - Expected Expected type annotation (:), found Expected type annotation (:) - Expected Expected RParen, found Word, found Expected RParen, found Word - Expected Expected return type (->), found Expected return type (->) - Expected Expected function body, found Expected function body - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected config block, found Expected config block - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration - Expected Expected top-level declaration, found Expected top-level declaration +None diff --git a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__unicode_strings.snap b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__unicode_strings.snap index 6c279cd43f..2d31027de3 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__unicode_strings.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__02_parser__unicode_strings.snap @@ -1,5 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === SYNTAX TREE === @@ -282,7 +282,7 @@ SOURCE_FILE Expected Expected function name, found Expected function name Expected Expected LParen, found Error, found Expected LParen, found Error Expected Expected parameter name, found Expected parameter name - Expected Expected type annotation (:), found Expected type annotation (:) + Expected Expected type annotation, found Expected type annotation Expected Expected RParen, found Error, found Expected RParen, found Error Expected Expected return type (->), found Expected return type (->) Expected Expected function body, found Expected function body diff --git a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__03_hir.snap b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__03_hir.snap index 4254c4f0e6..0ce7eb75f0 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__03_hir.snap @@ -1,6 +1,82 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +function FormatMessage { + params: [name: String] + return: String + body: Llm { + client: GPT4 + prompt: "\n Generate a message for \"{{ name }}\"\n Include quotes like: \"Welcome, '{{ name }}'!\"\n " + interpolations: [name, name] + } +} +class NestedQuotes { + single_in_double: String + double_in_single: String + She: Path(Path { segments: ["said"], kind: Plain }) + hello: Path(Path { segments: ["\"')\n escaped_in_escaped string @alias(\""], kind: Plain }) + The: Path(Path { segments: [""], kind: Plain }) + quote: Path(Path { segments: [""], kind: Plain }) + is: Path(Path { segments: ["here"], kind: Plain }) + complex_nesting: String + really: Path(Path { segments: [""], kind: Plain }) + complex: Path(Path { segments: [""], kind: Plain }) + json_like: String + key: Path(Path { segments: [""], kind: Plain }) + value: Path(Path { segments: [""], kind: Plain }) +} +function ProcessText { + params: [input: String] + return: String + body: Llm { + client: GPT4 + prompt: "\n Process the following text:\n {{ input }}\n \n Return the processed result.\n " + interpolations: [input] + } +} +class RawStrings { + simple: String + with_quotes: String + multi_hash: String + multiline: String +} +function GetRole { + return: Path(Path { segments: ["\"admin\" | \"user\" | \"guest\""], kind: Plain }) + body: Expr { + exprs: [ + Idx::(0): Literal(String(" \"user\"")) + Idx::(1): Block { stmts: [Idx::(0)], tail_expr: None } + ] + stmts: [ + Idx::(0): Return(Some(Idx::(0))) + ] + root: Idx::(1) + } +} +class Messages { + greeting: String + empty: String + with_spaces: String + with_escapes: String + with_quotes: String + hello: Path(Path { segments: [""], kind: Plain }) +} +class UnicodeStrings { + emoji_basic: String + emoji_multiple: String + emoji_in_text: String + chinese: String + arabic: String + japanese: String + russian: String + math_symbols: String + currency: String + arrows: String + zero_width: String + rtl_override: String +} +client GPT4 { + provider: unknown +} diff --git a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__05_diagnostics.snap b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__05_diagnostics.snap index 8e9b688ea2..5a68a82b40 100644 --- a/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__05_diagnostics.snap +++ b/baml_language/crates/baml_tests/snapshots/parser_strings/baml_tests__parser_strings__05_diagnostics.snap @@ -1,5 +1,5 @@ --- -source: target/debug/build/baml_tests-cb4594c533e23a52/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === DIAGNOSTICS === @@ -37,80 +37,6 @@ expression: output [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected type annotation (:), found Expected type annotation (:) - [parse] Expected Expected RParen, found Word, found Expected RParen, found Word - [parse] Expected Expected return type (->), found Expected return type (->) - [parse] Expected Expected function body, found Expected function body - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected config block, found Expected config block - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration - [parse] Expected Expected top-level declaration, found Expected top-level declaration [parse] Expected Expected RParen, found Word, found Expected RParen, found Word [parse] Expected Expected type, found Expected type [parse] Expected Unexpected token in class body, found Unexpected token in class body @@ -120,7 +46,7 @@ expression: output [parse] Expected Expected function name, found Expected function name [parse] Expected Expected LParen, found Error, found Expected LParen, found Error [parse] Expected Expected parameter name, found Expected parameter name - [parse] Expected Expected type annotation (:), found Expected type annotation (:) + [parse] Expected Expected type annotation, found Expected type annotation [parse] Expected Expected RParen, found Error, found Expected RParen, found Error [parse] Expected Expected return type (->), found Expected return type (->) [parse] Expected Expected function body, found Expected function body diff --git a/baml_language/crates/baml_tests/snapshots/simple_function/baml_tests__simple_function__03_hir.snap b/baml_language/crates/baml_tests/snapshots/simple_function/baml_tests__simple_function__03_hir.snap index 4254c4f0e6..60d65214e3 100644 --- a/baml_language/crates/baml_tests/snapshots/simple_function/baml_tests__simple_function__03_hir.snap +++ b/baml_language/crates/baml_tests/snapshots/simple_function/baml_tests__simple_function__03_hir.snap @@ -1,6 +1,18 @@ --- -source: target/debug/build/baml_tests-91bdee82f91f7b04/out/generated_tests.rs +source: target/debug/build/baml_tests-0fbde5d1c173768c/out/generated_tests.rs expression: output --- === HIR ITEMS === -No items found. +function HelloWorld { + params: [name: String] + return: String + body: Llm { + client: GPT4 + prompt: "\n Say hello to {{name}}\n " + interpolations: [name] + } +} +class User { + name: String + age: Int +} diff --git a/baml_language/crates/baml_tests/src/lib.rs b/baml_language/crates/baml_tests/src/lib.rs index 32b1410245..9470507ee6 100644 --- a/baml_language/crates/baml_tests/src/lib.rs +++ b/baml_language/crates/baml_tests/src/lib.rs @@ -55,3 +55,142 @@ fn format_node_recursive(node: &baml_db::baml_syntax::SyntaxNode, depth: usize) result } + +// Helper function for formatting HIR items from a specific file +fn format_hir_file( + db: &baml_db::RootDatabase, + source_file: baml_db::SourceFile, + items: &[baml_db::baml_hir::ItemId], +) -> String { + use baml_db::baml_hir::ItemId; + use std::fmt::Write; + + // Get the ItemTree once and keep it alive for all lookups + let item_tree = baml_db::baml_hir::file_item_tree(db, source_file); + let mut result = String::new(); + + for item in items { + match item { + ItemId::Function(func_id) => { + let func = &item_tree[func_id.id(db)]; + let sig = baml_db::function_signature(db, source_file, *func_id); + let body = baml_db::function_body(db, source_file, *func_id); + + writeln!(result, "function {} {{", func.name).unwrap(); + + // Show signature + if !sig.params.is_empty() { + write!(result, " params: [").unwrap(); + for (i, param) in sig.params.iter().enumerate() { + if i > 0 { + write!(result, ", ").unwrap(); + } + write!(result, "{}: {:?}", param.name, param.type_ref).unwrap(); + } + writeln!(result, "]").unwrap(); + } + writeln!(result, " return: {:?}", sig.return_type).unwrap(); + + // Show body + match body.as_ref() { + baml_db::baml_hir::FunctionBody::Llm(llm) => { + writeln!(result, " body: Llm {{").unwrap(); + if let Some(ref client) = llm.client { + writeln!(result, " client: {}", client).unwrap(); + } + if let Some(ref prompt) = llm.prompt { + writeln!(result, " prompt: {:?}", prompt.text).unwrap(); + if !prompt.interpolations.is_empty() { + write!(result, " interpolations: [").unwrap(); + for (i, interp) in prompt.interpolations.iter().enumerate() { + if i > 0 { + write!(result, ", ").unwrap(); + } + write!(result, "{}", interp.var_name).unwrap(); + } + writeln!(result, "]").unwrap(); + } + } + writeln!(result, " }}").unwrap(); + } + baml_db::baml_hir::FunctionBody::Expr(expr_body) => { + writeln!(result, " body: Expr {{").unwrap(); + + // Display all expressions + if !expr_body.exprs.is_empty() { + writeln!(result, " exprs: [").unwrap(); + for (idx, expr) in expr_body.exprs.iter() { + writeln!(result, " {:?}: {:?}", idx, expr).unwrap(); + } + writeln!(result, " ]").unwrap(); + } + + // Display all statements + if !expr_body.stmts.is_empty() { + writeln!(result, " stmts: [").unwrap(); + for (idx, stmt) in expr_body.stmts.iter() { + writeln!(result, " {:?}: {:?}", idx, stmt).unwrap(); + } + writeln!(result, " ]").unwrap(); + } + + // Display root expression + if let Some(root) = expr_body.root_expr { + writeln!(result, " root: {:?}", root).unwrap(); + } + + writeln!(result, " }}").unwrap(); + } + baml_db::baml_hir::FunctionBody::Missing => { + writeln!(result, " body: Missing").unwrap(); + } + } + + writeln!(result, "}}").unwrap(); + } + ItemId::Class(class_id) => { + let class = &item_tree[class_id.id(db)]; + writeln!(result, "class {} {{", class.name).unwrap(); + for field in &class.fields { + writeln!(result, " {}: {:?}", field.name, field.type_ref).unwrap(); + } + if class.is_dynamic { + writeln!(result, " @@dynamic").unwrap(); + } + // Note: Generic parameters are queried separately via generic_params() + writeln!(result, "}}").unwrap(); + } + ItemId::Enum(enum_id) => { + let enum_def = &item_tree[enum_id.id(db)]; + writeln!(result, "enum {} {{", enum_def.name).unwrap(); + for variant in &enum_def.variants { + writeln!(result, " {:?}", variant).unwrap(); + } + // Note: Generic parameters are queried separately via generic_params() + writeln!(result, "}}").unwrap(); + } + ItemId::TypeAlias(alias_id) => { + let alias = &item_tree[alias_id.id(db)]; + write!(result, "type {} = {:?}", alias.name, alias.type_ref).unwrap(); + // Note: Generic parameters are queried separately via generic_params() + writeln!(result).unwrap(); + } + ItemId::Client(client_id) => { + let client = &item_tree[client_id.id(db)]; + writeln!(result, "client {} {{", client.name).unwrap(); + writeln!(result, " provider: {}", client.provider).unwrap(); + writeln!(result, "}}").unwrap(); + } + ItemId::Test(test_id) => { + let test = &item_tree[test_id.id(db)]; + writeln!(result, "test {} {{", test.name).unwrap(); + if !test.function_refs.is_empty() { + writeln!(result, " functions: {:?}", test.function_refs).unwrap(); + } + writeln!(result, "}}").unwrap(); + } + } + } + + result +} diff --git a/baml_language/crates/baml_thir/src/lib.rs b/baml_language/crates/baml_thir/src/lib.rs index 795997eadc..40af7edc9f 100644 --- a/baml_language/crates/baml_thir/src/lib.rs +++ b/baml_language/crates/baml_thir/src/lib.rs @@ -12,18 +12,18 @@ pub use types::*; /// Type inference result. #[derive(Debug, Clone, PartialEq, Eq)] -pub struct InferenceResult { - pub return_type: Ty, - pub param_types: HashMap, - pub errors: Vec, +pub struct InferenceResult<'db> { + pub return_type: Ty<'db>, + pub param_types: HashMap>, + pub errors: Vec>, } /// Type errors that can occur during type checking. #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub enum TypeError { +pub enum TypeError<'db> { TypeMismatch { - expected: Ty, - found: Ty, + expected: Ty<'db>, + found: Ty<'db>, span: baml_base::Span, }, UnknownType { @@ -33,7 +33,7 @@ pub enum TypeError { // Add more variants as needed } -impl baml_base::Diagnostic for TypeError { +impl baml_base::Diagnostic for TypeError<'_> { fn message(&self) -> String { match self { TypeError::TypeMismatch { @@ -62,10 +62,15 @@ impl baml_base::Diagnostic for TypeError { /// Helper function for type inference (non-tracked for now) /// In a real implementation, this would use tracked functions with proper salsa types -pub fn infer_function(db: &dyn salsa::Database, func: FunctionId) -> InferenceResult { - // TODO: Implement type inference - // Get function data from HIR - let _data = baml_hir::function_data(db, func); +pub fn infer_function<'db>( + db: &'db dyn salsa::Database, + func: FunctionId<'db>, +) -> InferenceResult<'db> { + // TODO: Implement type inference by looking up function in ItemTree + // We need to get the file from the FunctionLoc, get the ItemTree, + // and look up the function data by its LocalItemId + let _file = func.file(db); + let _local_id = func.id(db); InferenceResult { return_type: Ty::Unknown, @@ -75,14 +80,17 @@ pub fn infer_function(db: &dyn salsa::Database, func: FunctionId) -> InferenceRe } /// Helper function for class type resolution (non-tracked for now) -pub fn class_type(db: &dyn salsa::Database, class: ClassId) -> Ty { - // TODO: Resolve class type - let _data = baml_hir::class_data(db, class); +pub fn class_type<'db>(db: &'db dyn salsa::Database, class: ClassId<'db>) -> Ty<'db> { + // TODO: Resolve class type by looking up class in ItemTree + // We need to get the file from the ClassLoc, get the ItemTree, + // and look up the class data by its LocalItemId + let _file = class.file(db); + let _local_id = class.id(db); Ty::Unknown } /// Helper function for enum type resolution (non-tracked for now) -pub fn enum_type(_db: &dyn salsa::Database, _enum_id: EnumId) -> Ty { +pub fn enum_type<'db>(_db: &'db dyn salsa::Database, _enum_id: EnumId<'db>) -> Ty<'db> { // TODO: Resolve enum type Ty::Unknown } diff --git a/baml_language/crates/baml_thir/src/types.rs b/baml_language/crates/baml_thir/src/types.rs index c0647b1232..8075828ab5 100644 --- a/baml_language/crates/baml_thir/src/types.rs +++ b/baml_language/crates/baml_thir/src/types.rs @@ -4,7 +4,7 @@ use baml_hir::{ClassId, EnumId}; /// A resolved type in BAML. #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub enum Ty { +pub enum Ty<'db> { // Primitive types Int, Float, @@ -13,21 +13,24 @@ pub enum Ty { Null, // User-defined types - Class(ClassId), - Enum(EnumId), + Class(ClassId<'db>), + Enum(EnumId<'db>), // Type constructors - Optional(Box), - List(Box), - Map { key: Box, value: Box }, - Union(Vec), + Optional(Box>), + List(Box>), + Map { + key: Box>, + value: Box>, + }, + Union(Vec>), // Special types Unknown, Error, } -impl Ty { +impl Ty<'_> { /// Check if this type is an error type. pub fn is_error(&self) -> bool { matches!(self, Ty::Error)