Skip to content

Commit 4fac525

Browse files
ryo33claude
andcommitted
Fix docs: align with actual implementation
- Rewrite euredocument-vs-value.eure: remove non-existent Value type, replace with FromEure/eure_json/NodeValue actual APIs - Add "Design Proposal" banners to completion_architecture.eure and completion_with_error_recovery.eure (types not yet implemented) - Mark schema-extensions.eure bundling section as not yet implemented - Mark template-extensions.eure features as planned but unimplemented - Fix cst-and-visitor.eure: CstInterpreter path, insert_node → create_node+add_child_by_segment - Fix schemas.eure: $types[] → $types.name notation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ce2ec26 commit 4fac525

7 files changed

Lines changed: 176 additions & 250 deletions

docs/completion_architecture.eure

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
$docs {
22
title: Eure Completion System Architecture
3-
description: This document describes a complete redesign of the Eure LSP completion system to use proper CST (Concrete Syntax Tree) traversal instead of string-based parsing.
3+
description: Design proposal for the Eure LSP completion system using CST traversal instead of string-based parsing. The described types are not yet implemented.
44
}
55

66
"#": Eure Completion System Architecture
77

8+
"body" = ```markdown
9+
> **Design Proposal — Not Yet Implemented**
10+
>
11+
> This document describes a planned redesign of the Eure LSP completion system. The types and structs described here (`CompletionVisitor`, `CompletionContext`, `PositionMapper`, `CompletionPosition`) do not currently exist in the codebase. This document records the intended architecture for future implementation.
12+
```
13+
814
"toc".$toc = true
915

1016
@ "overview" {

docs/completion_with_error_recovery.eure

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
$docs {
22
title: Completion with Error Recovery Approach
3-
description: We need to support completion for: - Trailing dots: @ script. (complete after dot) - Empty values: key = (complete value) - Partial keys: @ scr (complete key)
3+
description: Design proposal for error-recovery-based completion. The described types (ErrorBasedCompletion, PathExtractorVisitor) are not yet implemented.
44
}
55

66
"#": Completion with Error Recovery Approach
77

8+
"body" = ```markdown
9+
> **Design Proposal — Not Yet Implemented**
10+
>
11+
> This document describes a planned approach for completion with error recovery. The types described here (`ErrorBasedCompletion`, `PathExtractorVisitor`, `ErrorContext`, `PathContext`) do not currently exist in the codebase. This document records the intended architecture for future implementation.
12+
```
13+
814
"toc".$toc = true
915

1016
@ "problem-statement" {

docs/cst-and-visitor.eure

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ The combination of auto-generated, type-safe node access (`Handle` and `View`) a
265265
"##": CstInterpreter: Extracting Values from CST
266266

267267
"body" = ```markdown
268-
While the `CstVisitor` trait provides a generic way to traverse the CST, the `CstInterpreter` struct (in `value_visitor.rs`) provides a specialized implementation for extracting structured data from Eure documents.
268+
While the `CstVisitor` trait provides a generic way to traverse the CST, the `CstInterpreter` struct (in `crates/eure/src/document/interpreter.rs`) provides a specialized implementation for extracting structured data from Eure documents.
269269
```
270270

271271
@ "cstinterpreter-overview" {
@@ -337,7 +337,8 @@ schema_validator.validate(&document); // Can report exact error locations
337337

338338
"rust-snippet" = ```rust
339339
// Internally, bindings like `user.name = "Alice"` become:
340-
document.insert_node(vec![PathSegment::Ident("user"), PathSegment::Ident("name")], Value::String("Alice"))
340+
let node_id = document.create_node(NodeValue::Primitive(PrimitiveValue::Text(Text::plain("Alice"))));
341+
document.add_child_by_segment(user_id, PathSegment::Ident("name".into()), node_id)?;
341342
```
342343

343344
"body-2" = ```markdown

0 commit comments

Comments
 (0)