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

Is it possible to single step the basic code? #3

Open
mercurial-moon opened this issue May 31, 2023 · 2 comments
Open

Is it possible to single step the basic code? #3

mercurial-moon opened this issue May 31, 2023 · 2 comments

Comments

@mercurial-moon
Copy link

HI,
Thanks for the wonderful contribution.
Is there a mechanism to single step the basic code, if not can you please let me know would it be simple to create such a feature?

@Timu5
Copy link
Owner

Timu5 commented Jun 13, 2023

Hey, sorry for long time without respond.

Code dont allow it but can be modified to do so.

in interpreter.cs there is this code:

        public void Exec()
        {
            exit = false;
            GetNextToken();
            while (!exit) Line(); // do all lines
        }

You can add two new method lets say Init() and Step():

        public void Init()
        {
            exit = false;
            GetNextToken();
        }
        public void Step()
        {
            if(!exit) Line(); 
        }

@mercurial-moon
Copy link
Author

Thanks for the response!
Really appreciate it!

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

No branches or pull requests

2 participants