Skip to content

✨ Add basic library functionality#238

Open
LesterEvSe wants to merge 5 commits intoBlockstreamResearch:masterfrom
LesterEvSe:feature/basic-library-functionality
Open

✨ Add basic library functionality#238
LesterEvSe wants to merge 5 commits intoBlockstreamResearch:masterfrom
LesterEvSe:feature/basic-library-functionality

Conversation

@LesterEvSe
Copy link
Collaborator

@LesterEvSe LesterEvSe commented Mar 16, 2026

Added

  • Support for parsing use and pub keywords.
  • The --lib flag to load external libraries.
  • The driver.rs file to resolve external libraries.
  • The C3 Linearization algorithm to resolve the library order within the driver.rs file.
  • Test coverage for the new functionality.

Updated

Change the ast.rs file in accordance with the changes mention above.

Note: This PR contains a basic implementation of library support. Therefore, improved error display, loading multiple libraries, and handling reserved words will be addressed in future PR

@LesterEvSe LesterEvSe requested a review from KyrylR March 16, 2026 12:18
@LesterEvSe LesterEvSe requested a review from delta1 as a code owner March 16, 2026 12:18
@LesterEvSe LesterEvSe added the enhancement New feature or request label Mar 16, 2026
@LesterEvSe LesterEvSe marked this pull request as draft March 16, 2026 12:19
@LesterEvSe LesterEvSe force-pushed the feature/basic-library-functionality branch 8 times, most recently from 1939b43 to 640a195 Compare March 17, 2026 09:23
@LesterEvSe LesterEvSe marked this pull request as ready for review March 17, 2026 10:30
src/parse.rs Outdated
Comment on lines +118 to +123
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub enum Visibility {
Public,
Private,
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub enum Visibility {
Public,
Private,
}
#[derive(Clone, Debug, PartialEq, Eq, Hash, Default)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub enum Visibility {
Public,
#[default]
Private,
}

@LesterEvSe LesterEvSe force-pushed the feature/basic-library-functionality branch 7 times, most recently from 37e9ab7 to 8452a89 Compare March 18, 2026 12:04
@LesterEvSe LesterEvSe force-pushed the feature/basic-library-functionality branch 4 times, most recently from 2dae4f9 to 3492379 Compare March 18, 2026 13:57
- Refactor AST to include tests and modules
- Add simple tests for module flow
@LesterEvSe LesterEvSe force-pushed the feature/basic-library-functionality branch from 3492379 to 94a1203 Compare March 18, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants