You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
struct literal syntax does not work with custom dialect #1227
FWIW, it seems like this is due to the usage of dialect_of! throughout the parser code.
It seems like either the dialect itself needs to be in control of supported syntaxes, or a custom dialect should just be treated as an extension of GenericDialect.
I think the latter would be a bit easier as dialect_of is used ~100 times, so that would be a lot of functionality to expose to the Dialect trait.
Activity
universalmind303 commentedon Apr 18, 2024
FWIW, it seems like this is due to the usage of
dialect_of!throughout the parser code.It seems like either the dialect itself needs to be in control of supported syntaxes, or a custom dialect should just be treated as an extension of
GenericDialect.I think the latter would be a bit easier as
dialect_ofis used ~100 times, so that would be a lot of functionality to expose to theDialecttrait.universalmind303 commentedon Apr 18, 2024
Looking more closely at the code, it looks like you can "extend" a dialect by implementing the
Dialect::dialectmethod