question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

  1. Someone want to parser SCSS with // one line comment.
  2. I want to have light syntax without ; (and maybe with one line comment).
  3. 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.

/cc @lydell @MoOx @rvanes

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:56 (43 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Jun 1, 2022

@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 that postcss-scss do no compile SCSS to CSS? You must use sass to compile it.

postcss-scss was created for instance to change SCSS source in the place.

0reactions
GoudekettingRMcommented, Jun 1, 2022

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…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found