Hello and welcome, everybody.
And in this lecture, we're going to implement the parsing of commas.
So soon we'll have like function calls where they can do things like this.
We need to be able to handle that.
So we're going to implement the passing of commas so that that will be easier to implement later on.
So search for parse expression.
Just above here, we're going to say void parse for comma, struct, history, history.
So firstly, we're going to skip the comma.
Now we're going to pop off the left node because if we do 50, comma, 30, 50 has already been parsed
at this point, right?
So we're left with the comma.
So we pop that off and then we pop off the number that we parsed earlier.
So that's what we're doing now.
We're going to get the right node, so we're going to go pause, impressionable root and we're going
to pass in the history.
So we're going to say struck node, no write equals no pop make expression node left node.
And we're going to change that to right node, by the way, right node.
And then the operator will be the, uh, the comma basically.
Now here we're going to say elseif s equal token peak next as well, comma parse for comma.
So that is the parsing of commas.
So now we're going to do a make clean and to make.
We're going to go to test at sea and we're going to say X equals 50, comma 30.
We're going to run that and we can see everything works.
Congratulations.