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

use # for comments and ; as delimiter for single line expressions #56

Merged
merged 3 commits into from
May 23, 2021

Conversation

knarz
Copy link
Contributor

@knarz knarz commented May 22, 2021

This PR should allow to write one-liners as outlined in #43 such as

push1 42; push1 13; sstore;
push1 42; push1 13; sstore
push1 42; push1 13; sstore
push1 42

Copy link
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

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

Hey! Thanks for your contribution to ETK. It's very much appreciated!

There are two doctests in the book that are failing (and unfortunately the CI isn't set up to run correctly on PRs.)

In doc/src/ch02-lang/README.md there's an old-style comment left over, and in doc/src/ch02-lang/ch02-labels.md there's a slightly different error.

You can run the book tests locally with the following, from the repository root:

mdbook test doc -L ./target/debug/deps

@knarz
Copy link
Contributor Author

knarz commented May 23, 2021

Looks like the error in doc/src/ch02-lang/ch02-labels.md is also present in master. Gonna see if I can figure that one out tomorrow

@SamWilsn
Copy link
Contributor

Looks like the error in doc/src/ch02-lang/ch02-labels.md is also present in master.

mdbook test is pretty naive. You might need to cargo clean && cargo build after switching branches?

The other test passes now though :D

@knarz
Copy link
Contributor Author

knarz commented May 23, 2021

Rusty! The issue with the mdbook was that now the single line comment # and it has the value 0, since it is got stripped of its # because it got interpreted as being a comment for mdbook.

Copy link
Contributor

@lightclient lightclient left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your pull request. Very much appreciated :) Now that we can write one-liners, I think this makes etk a pretty good replacement for LLL tests in ethereum/tests.

@lightclient lightclient merged commit e6c00c9 into quilt:master May 23, 2021
@knarz knarz deleted the use-semicolon-as-delimiter branch August 27, 2021 21:19
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.

3 participants