instead of `as VarDeclaration` etc you could use `satisfies VarDeclaration`. This way you would catch type errors better later. But probably this video was created before `satisfies` was available in TS
A lot of good material here, - am following along but doing it in Javascript... Slowly realizing how Typescript does indeed provide certain benefit. I haven't made the switch yet though.. 😬
For sure. Feel free to reach out on discord and I would love to talk about any questions you have regarding parsing/compiling etc. If you want you can hop on a discord call with me and I can go over any questions you have. My discord is tylerlaceby#9121
4:07 I'm making a language based on this tutorial. I have a different syntax, " identifier : type value; ", I would appreciate it if you could help me by telling me the best way to handle this.
why not just build an AST from the source before interpreting it.. you can get type information and attributes like constant and static within the nodes and not have to do weird stuff like storing a separate set of constants.... seems silly to me
This is what we do. We build the AST, then interpret it. And yes we could write a type checker and deal witt that however this series is a high level overview. There’s only so much time per episode and in my busy life. The goal of the series is a introduction to parsers and basic interpreters. Not a series about building a compiler with JIT, Static Analysis, Optimized IR, Etc….
These tutorials are useful not just to make a programming language but also to learn TypeScript. Great work. :)
4k subs? You deserve more than 4 million bro.
I like how you included the error solving in the video. Awesome tutorial!
This is an awesome series. Thank you, and subscribed.
gotta say, this is an awesome series. well done!
lovely tutorial, great pacing, god bless you
instead of `as VarDeclaration` etc you could use `satisfies VarDeclaration`. This way you would catch type errors better later. But probably this video was created before `satisfies` was available in TS
That is an excellent point. Satisfied is much better suited for this case.
@@tylerlaceby satisfies won't work as expected, as example if the return value is : Stmt and he does satisfies VarDeclaration it will show an error.
cool stuff man
A lot of good material here, - am following along but doing it in Javascript... Slowly realizing how Typescript does indeed provide certain benefit. I haven't made the switch yet though.. 😬
Is there anywhere I could ask you questions about this?
For sure. Feel free to reach out on discord and I would love to talk about any questions you have regarding parsing/compiling etc.
If you want you can hop on a discord call with me and I can go over any questions you have.
My discord is tylerlaceby#9121
@@tylerlaceby Thanks, could you invite me?
4:07 I'm making a language based on this tutorial.
I have a different syntax, " identifier : type value; ", I would appreciate it if you could help me by telling me the best way to handle this.
I can. It would be easiest inside discord
why not just build an AST from the source before interpreting it.. you can get type information and attributes like constant and static within the nodes and not have to do weird stuff like storing a separate set of constants.... seems silly to me
This is what we do. We build the AST, then interpret it. And yes we could write a type checker and deal witt that however this series is a high level overview. There’s only so much time per episode and in my busy life.
The goal of the series is a introduction to parsers and basic interpreters. Not a series about building a compiler with JIT, Static Analysis, Optimized IR, Etc….