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
This issue aims to implement a unified parser that replaces nom and syn::parse:
Accepts both proc_macro2::TokenStream and String as input
Preserves location information in both proc_macro2::Span and string cursor
Emits a custom format with nice error message for string literal and native compile_error! for proc_macro2::TokenStream
Minimum Requirement:
When runtime parser is enabled, it needs to be not bigger than current nom based parser (~70KB before gzipped)
Passes all test cases (feature parity)
Good to Have:
Performance (whilst some performance degradation is acceptable / expected (due to more intermediate steps), the new parser should still have solid performance)
Advanced Diagnostic Information / parser tolerance (The parser should either tolerant any error (like browser) or provide helpful diagnostic information when encountering an error)
Flow: Input(String or proc_macro2::TokenStream) -> Tokenise(stylist::parser::TokenStream) -> Parse(stylist::parser::ast) -> Output(stylist::ast)
There's no ETA for this issue and it will land when the work completes.
The text was updated successfully, but these errors were encountered:
In addition, with the new parser only rely on std and arcstr(which maybe removed if a customised ArcStr is smaller) when parsing string literals, I think it makes sense to make parser available to everyone for debug_assertions in Style and GlobalStyle in debug mode.
This issue aims to implement a unified parser that replaces
nom
andsyn::parse
:proc_macro2::TokenStream
andString
as inputproc_macro2::Span
and string cursorcompile_error!
forproc_macro2::TokenStream
Minimum Requirement:
Good to Have:
Flow: Input(
String
orproc_macro2::TokenStream
) -> Tokenise(stylist::parser::TokenStream
) -> Parse(stylist::parser::ast
) -> Output(stylist::ast
)There's no ETA for this issue and it will land when the work completes.
The text was updated successfully, but these errors were encountered: