Stim compiler#3305
Draft
joao-boechat wants to merge 16 commits into
Draft
Conversation
| .chars | ||
| .peek() | ||
| .map_or(self.input_len as usize, |(i, _)| *i); | ||
| // TODO: What if some identifier starts with "rec" but is not a rec token? |
| } | ||
| } | ||
|
|
||
| //TODO: Deal with escaping |
| } | ||
|
|
||
| fn parse_item(&mut self) -> Option<Item> { | ||
| // TODO WHAT IF IT STARTS WITH A NEWLINE? |
| } | ||
| return Some(Item::Line(self.parse_line(instruction))); | ||
| } else { | ||
| // TODO error! The start of every item should be an instruction; |
| lo: span.lo + 5, | ||
| hi: span.hi - 1, | ||
| }), | ||
| ), // Strips 'rec[-' prefix and trailing ']' TODO validate it |
| hi: span.hi - 1, | ||
| }), | ||
| ), | ||
| }, // Strips 'sweep[' prefix and trailing ']' TODO validate it |
billti
reviewed
Jun 12, 2026
|
|
||
| fn main() { | ||
| let stim_code = | ||
| fs::read_to_string("examples/example.stim").expect("Failed to read examples/example.stim"); |
Member
There was a problem hiding this comment.
I don't see this file anywhere in the PR. Also, most of our tests use inline string of input/output to verify, rather than external files.
Contributor
Author
There was a problem hiding this comment.
this is for my manual testing, just so I can parse whole files at a time without having to edit the code every time. I will make sure to remove it before the official PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.