report error messages #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currenly it's easy to make our AST parser fail while the type checker succeeds, e.g.
or
If our AST parser fails, it expands to a
Rule.t listinstead of a class name which leads to very confusing compile errors when the user tries to use the "class name".While the first example could be prevented by allowing empty lists (empty rulesets are a warning, not an error in CSS), the second example is more difficult to work around. The problem is that the
Pseudo_elementconstructor of theRule.ttype allows definitions like the above, but they would actually produce invalid CSS (see "Cannot represent pseudo-elements"). This is why for pseudo-elements, our AST parser only accepts nested definitions, not nested pseudo-classes or pseudo-elements.The question is: Can we report error messages to the user, that make it clear where exactly the parsing failed? Maybe the Merlin_helpers module can help?