Swift: REPL added#239
Draft
BuggusMageevers wants to merge 1 commit intoThePrimeagen:masterfrom
Draft
Conversation
Contributor
Author
|
@MatsMoll - started an REPL. |
c893237 to
baa7d10
Compare
Contributor
|
you might want to consider rebasing this PR onto upstream/master to avoid rewriting all that history... |
Contributor
Author
|
You know what, that sounds like a great idea. I'm not really sure how I got my local repo so out of sync though. @Spongman, I'm not great with git. I should be able to just do a rebase and place my changes as the most recent commit? |
Contributor
|
yeah, you should be able to do something like: git stash # save any changes in your working dir
git fetch --all # sync with the server
git checkout master # switch to local master branch
git reset --hard origin/master # sync with your github repo
git rebase upstream/master # rebase your changes onto the upstream branch
git push -f # force-push to your github repo
git stash pop # restore your working dir changesI use these defaults, ymmv: |
Contributor
Author
|
Thank you, I'll give that a try. |
`REPL` for Monkey language prints a list of tokens. `evaluate()` function added to `Lexer` to make processing a line from the `REPL` cleaning in `main`.
Contributor
Author
|
Ended up deleting my local, cloning from Prime's repo, applying my changes, committing, and pushing this to my fork. I had not done all that much so it seemed easiest. Should have fixed the history problem. |
MatsMoll
approved these changes
Jun 19, 2023
Contributor
MatsMoll
left a comment
There was a problem hiding this comment.
Nicely done @BuggusMageevers 🚀
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.
Added initial REPL. Needs a little work yet before merge: adds multiple EOF's currently. However, the token's produced are otherwise correct and the REPL can be exited with "quit".