Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse complex numbers. #164

Merged
merged 12 commits into from
Feb 10, 2024
Merged

Parse complex numbers. #164

merged 12 commits into from
Feb 10, 2024

Conversation

wmedrano
Copy link
Contributor

@wmedrano wmedrano commented Feb 9, 2024

No description provided.

@wmedrano wmedrano marked this pull request as draft February 9, 2024 17:41
Things like 2i don't seem to usually parse as complex numbers in some Schemes.
Copy link
Contributor Author

@wmedrano wmedrano left a comment

Choose a reason for hiding this comment

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

I think this is close. Left some comments for areas I don't understand very well.

crates/steel-core/src/compiler/code_gen.rs Show resolved Hide resolved
crates/steel-core/src/compiler/program.rs Show resolved Hide resolved
crates/steel-core/src/parser/replace_idents.rs Outdated Show resolved Hide resolved
crates/steel-core/src/steel_vm/engine.rs Outdated Show resolved Hide resolved
crates/steel-parser/src/tokens.rs Show resolved Hide resolved
@wmedrano
Copy link
Contributor Author

wmedrano commented Feb 10, 2024

I should do some more reading into steel-core/src/compiler, but at least the tests pass!

I closed all the conversations with comments that seem fine so program.rs seems to be the sketchiest part.

@wmedrano wmedrano marked this pull request as ready for review February 10, 2024 07:03
@mattwparas
Copy link
Owner

I should do some more reading into steel-core/src/compiler, but at least the tests pass!

I closed all the conversations with comments that seem fine so program.rs seems to be the sketchiest part.

Yeah 😅 things get a little gnarlier in the compiler there.

I spot checked it and I'm reasonably confident the change is right. That pass is just checking if the constant is either 0, 1, or 2 (integer) - which you kept in place, so that seems fine.

@wmedrano
Copy link
Contributor Author

oh yeah, the usage was pretty simple. I think this is good to go. I can also split this into smaller PRs if you'd like. The token refactor had a lot more changes than I expected.

@mattwparas
Copy link
Owner

oh yeah, the usage was pretty simple. I think this is good to go. I can also split this into smaller PRs if you'd like. The token refactor had a lot more changes than I expected.

No need, I'll do one more pass and otherwise I think its good as well

@mattwparas mattwparas merged commit 6c1ecd1 into mattwparas:master Feb 10, 2024
3 checks passed
@wmedrano wmedrano deleted the complex branch February 11, 2024 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants