Skip to content
Merged
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
11 changes: 5 additions & 6 deletions compatibility/compiler-expectations.json
Original file line number Diff line number Diff line change
Expand Up @@ -766,17 +766,16 @@
},
{
"fixture": "synthetic/issue-31-positive",
"nativeStatus": "failure",
"nativeStatus": "success",
"classification": "known-gap",
"comparison": "diagnostic-code",
"comparison": "semantic-wir",
"evidence": [
"oracle:synthetic/issue-31-positive/oracle.json",
"provenance:synthetic/issue-31-positive/fixture.json"
],
"owner": "opy-rs#88",
"note": "The positive optimizer/directive fixture exceeds the independently evidenced compiler baseline.",
"failureClass": "integration",
"diagnosticCode": "unsupported-integration-surface"
"owner": "opy-rs#145",
"note": "The semantic HIR now materializes the implicit def subroutine declaration; optimizer/directive compiler parity remains a separate lowering gap.",
"semanticEquivalent": false
},
{
"fixture": "synthetic/issue-33-f-string",
Expand Down
11 changes: 11 additions & 0 deletions crates/opy-rs/src/cst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,21 @@ use crate::diag::Span;
pub struct Program {
pub declarations: Vec<Decl>,
pub rules: Vec<RuleEntry>,
/// All top-level forms in source order. The category-specific vectors are
/// retained for the HIR-shaped parser API, while lowering uses this list
/// for scope and visibility decisions.
pub top_level: Vec<TopLevel>,
/// The parsed top-of-file `settings { ... }` block, when present (#86).
pub settings: Option<Settings>,
}

/// A top-level declaration or rule entry in source order.
#[derive(Debug, Clone)]
pub enum TopLevel {
Declaration(Decl),
Rule(RuleEntry),
}

/// A parsed `settings { ... }` block (JSONC, #86).
#[derive(Debug, Clone)]
pub struct Settings {
Expand Down
Loading
Loading