Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

* Replaced the deprecated `WithFile` trait with `WithContent` and `WithSource` to cleanly separate single-file execution from multi-file environments. Additionally, replaced the `file()` method on `RichError` with `source()`. [#266](https://github.com/BlockstreamResearch/SimplicityHL/pull/266)

# 0.5.0-rc.0 - 2026-03-14

* Migrate from the `pest` parser to a new `chumsky`-based parser, improving parser recovery and enabling multiple parse errors to be reported in one pass [#185](https://github.com/BlockstreamResearch/SimplicityHL/pull/185)
Expand Down
7 changes: 7 additions & 0 deletions doc/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Architecture Note: Omitted Keywords
The `crate` and `super` keywords were not added to the compiler because they
are unnecessary at this stage. Typically, they are used to resolve relative
paths during import parsing. However, in our architecture, the prefix before
the first `::` in a `use` statement is always an dependency root path. Since all
dependency root paths are unique and strictly bound to specific paths, the resolver
can always unambiguously resolve the path without needing relative pointers.
4 changes: 2 additions & 2 deletions fuzz/fuzz_targets/compile_parse_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
fn do_test(data: &[u8]) {
use arbitrary::Arbitrary;

use simplicityhl::error::WithFile;
use simplicityhl::error::WithContent;
use simplicityhl::{ast, named, parse, ArbitraryOfType, Arguments};

let mut u = arbitrary::Unstructured::new(data);
Expand All @@ -22,7 +22,7 @@ fn do_test(data: &[u8]) {
};
let simplicity_named_construct = ast_program
.compile(arguments, false)
.with_file("")
.with_content("")
.expect("AST should compile with given arguments");
let _simplicity_commit = named::forget_names(&simplicity_named_construct);
}
Expand Down
4 changes: 4 additions & 0 deletions src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,10 @@ impl AbstractSyntaxTree for Item {
parse::Item::Function(function) => {
Function::analyze(function, ty, scope).map(Self::Function)
}
parse::Item::Use(use_decl) => Err(RichError::new(
Error::CannotCompile("The `use` keyword is not supported yet.".to_string()),
*use_decl.span(),
)),
parse::Item::Module => Ok(Self::Module),
}
}
Expand Down
Loading
Loading