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 AssemblyStackAssignement working correctly? #7

Open
fvictorio opened this issue Feb 15, 2020 · 1 comment
Open

Is AssemblyStackAssignement working correctly? #7

fvictorio opened this issue Feb 15, 2020 · 1 comment

Comments

@fvictorio
Copy link

Using AST explorer with this code:

		assembly {
			x := 3
            4 =: y
  		}

results in this nodes:

image

Notice that the stack assignment is separated from the expression assigned to it.

I don't know if this is intentional or not (I don't know much about solidity's assembly), but it makes it harder to use.

In the grammar, the assignment and stack assignment are defiend as this:

assemblyAssignment
  : assemblyIdentifierOrList ':=' assemblyExpression ;

assemblyStackAssignment
  : '=:' identifier ;

So I wonder why is not done like this:

assemblyStackAssignment
  : assemblyExpression '=:' identifier ;
@GNSPS
Copy link
Collaborator

GNSPS commented Feb 22, 2020

Definitely taking a look over this next week!

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