Custom parsers
See original GitHub issue- Someone want to parser SCSS with
// one line comment
. - I want to have light syntax without
;
(and maybe with one line comment). - Some legacy code requires Safe Mode parser to forget big CSS issues. Not it is in parser by options and it is not good solution.
Maybe we should allow PostCSS to change parsers:
postcss.process(css);
postcss.process(css, { parser: SafeParser });
All parser should return same AST, but them can parse any syntax.
Issue Analytics
- State:
- Created 9 years ago
- Comments:56 (43 by maintainers)
Top Results From Across the Web
How to Build a Custom Parser - Packet Coders
A guide into the world of parsing. Learn how to build your own custom parser from scratch.
Read more >Custom Parsing - IBM
Custom parsing is implemented when users must enter values in a form that existing parse operations do not recognize or when some other...
Read more >Working with Custom Parsers - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >6 Custom Parser Example
This chapter provides an example of creating a new parser for a custom content format. It describes AuParser, which is an example of...
Read more >Custom Parsers - What is Trunk?
... doesn't natively understand how to parse it, you can inject your own custom parser to translate its output into a format that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GoudekettingRM Custom parsers are incompatible with Tailwindcss since they have CSS parser inside.
But it seems like for me, that you are using
postcss-scss
in a wrong way. Do you understand thatpostcss-scss
do no compile SCSS to CSS? You must usesass
to compile it.postcss-scss
was created for instance to change SCSS source in the place.Yeah, I understand, I have this really shitty issue where we have tailwind and scss combined in a legacy project…
So I’m trying to get both to compile to the same place, but it’s a bit of a hassle…