-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Convert type_id from String to a node #592
Conversation
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.
Looks good 👍 I guess if it compiles and works with the real word repo it should be good! Once merged I'll test mint-ui
with it.
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.
I'm wondering, wouldn't be cleaner to implement TypeId#to_s
and Comparable(String)
to avoid explicit usage of #value
property?
I guess we could do that, however we currently don't, so I don't know if it's in the scope of this PR or not 🤔 |
@gdotdesign I'm pretty sure we could at least implement ast.stores.find(&.name.value.==(connect.store.value)) |
Fixed all of the above 😄 As an aside it may be worth hardening the |
This PR modifies the
type_id
/type_id!
methods of the parser to return a new node (Ast::TypeId
) rather than return aString
. Any other node affected by this has also been updated.This should make it easier to implement language server features where it can be useful to exact positions of some nodes. e.g. the
name
of anAst::Component
I've tested this change against the
mint-realworld
repository, runningmint docs
etc and everything seemed OK, but could possible use more testing given how much is changed.