HELP NEEDED WITH CREATING A LANGUAGE!
[deleted]

So, I have this language that I have been developing. It uses Regex's to "translate" Hsuya's(My language) code to JavaScript. This works well and all but, I want to make it have errors. If anyone could help me with that, that would be great!

You are viewing a single comment. View All
Coder100

Would you like to see the tutorial I used to learn to program the language?
https://craftinginterpreters.com
it is only slightly biased towards the fact that it is a class-based language, but it should be a very good start.

[deleted]

Thank you all for your helpful comments. I realize I wasn't asking the right question. As I stated, I created this using Regex's that transpiled it to JavaScript but I would like to add my own errors for this language because at the time it is not really showing them. Here is a picture of what I mean:


Coder100

oh, well ideally you should catch those errors yourself. You would need some way to actually know what that string was, and you would do that by actually parsing through the text. RegEx can only go so far when making a language. @AJK4

[deleted]

Okay, now I understand. @Coder100

Coder100

nice! @AJK4

programmeruser

@Coder100 I just read the source code of cookeylang lol
(it's really just a implementation of the principles in Crafting Interpreters)

Coder100

lol yeah it is
when you use a tutorial your code usually is based on the logic of the tutorial @programmeruser