So last lecture, some of you might have tried to test that, fix a function out functionality that
we made, but you would have noticed that we haven't yet finished implementing forward declarations.
So although there's a little bit of code relating to it and the actual parsing process of it isn't quite
there.
So we're going to make that in this lecture.
So just above here in parse, variable function or union and parse it out, see, we're basically going
to just say F token, next is symbol semicolon, then parse forward declaration.
We haven't created this function yet, D type and then return.
So this helps deal with our forward declarations.
You can see I've written some code here as an example.
Struct dog, struct dog.
Yeah.
And if we did a main, we actually C expecting a bad name for the given variable declaration on line
five.
So it doesn't actually see that it's a forward declaration.
So this code checks for that here.
Checks for that and then it'll call parse for declaration.
So we're going to create that.
Now that function
and all it's going to do is calls is called parse struct basically
since this is a forward declaration, pause the struct.
Okay, so now we're going to try and make clean and a make.
And I want you to write similar code to what I've done here.
So we have a struck dog and then we forward declaration beneath it.
Type Main.
Everything works fine if I put it above this so we can see with the dog above this structure dog everything
also works fine.
So we now have forward declarations.
Congratulations.