-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Indented syntax improvements] Specs #2041
base: main
Are you sure you want to change the base?
Conversation
…d-syntax-proposal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other expressions that should probably have whitespace tests include parentheses and function calls.
…d-syntax-improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nex3 I think I resolved all the issues.
Other expressions that should probably have whitespace tests include parentheses and function calls.
For parentheses, I do have tests in spec/values/maps/sass.hrx and spec/values/lists/sass.hrx, and also expanded tests in functions and parentheses in 2719995.
This also caught a bug in parsing @function a($b: c\nd)
. I fixed this and changed expressionUntilComma
to always consume whitespace (because it is currently only called in places that can consume whitespace) here-
sass/dart-sass@e1df2ad
spec/operators/boolean.hrx
Outdated
================================================================================ | ||
<===> whitespace/not/before/sass/input.sass | ||
$a: b | ||
not c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cleaned this up a bit in b5065e4, but am wondering if there are additional cases I should test around differentiating binary and unary operations that use -
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty close!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The core_functions
directory is for testing the semantics of functions. Function call syntax doesn't differ between built-in, user-defined, and plain-CSS functions (except that the latter allows interpolation and not namepsaces) so syntactic tests for functions should go in a single, syntax-oriented location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to spec/expressions/functions in 5a5ff45, and also switched to using list.append
so I'm not using a deprecated function.
spec/css/media/whitespace.hrx
Outdated
@@ -18,6 +18,42 @@ Error: Expected identifier. | |||
' | |||
input.sass 1:7 root stylesheet | |||
|
|||
<===> | |||
================================================================================ | |||
<===> error/logic_sequence/before_operator/sass/input.sass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error directory should go at the end of the HRX file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved in cd4eced
|
||
<===> | ||
================================================================================ | ||
<===> error/after_arg/sass/input.sass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also test @extend a\nb
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in cd4eced
@@ -0,0 +1,5 @@ | |||
<===> content/semicolon/input.sass | |||
@mixin a | |||
@content; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a semicolon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was porting over a nonconformant test, originally in spec/non_conformant/sass/semicolon/content.hrx. Should it be removed?
Blocked until proposal is accepted.
[skip dart-sass]
[skip sass-embedded]