-
Notifications
You must be signed in to change notification settings - Fork 158
Add odin support #460
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
Add odin support #460
Conversation
- Types and Variables are declared basically the same anyway so combining them seems like a good idea
@Lain62 what will it be then? |
I think its more important to be 100% correct, and to have the biggest coverage. Don't really want a situation where people get frustrated for it not finding something even if its rare. So I think keeping it as it is, is the best. |
But it's not 100% right now, since functions can also be declared with |
Oh and one more thing, I would change the generic regex to include the optional type specifier and the second |
Thanks @Lain62 and @diniamo! All the tests pass, and this looks like a safe change, so I am ready to merge whenever you both are happy, assuming those two things stay true. So, please let me know; also, If you want to add "Odin" to the |
alright I've added |
Functions can also have an identifier, e.g., |
okay ngl, i did not know you can put identifiers on functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I think that should work. I don't exactly understand the part of the regex that matches the type identifier, but it seems to have resolved every obscure test case I could throw at it, so we should be good.
I will make a note of this, but I'm fairly certain that we won't be able to handle very obscure cases like this:
var : struct {
a: i32
} : { a = 1 } fmt.println(var)
is valid Odin. However as I said, I don't think we can account for that.
yeah i don't think its possible to account for it. i think it should be good now |
@jacktasia Looks like we are ready to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Added a simple odin lang support https://odin-lang.org/
it seems to be working well.