Skip to content
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] Dart implementation #2467

Merged
merged 69 commits into from
Feb 5, 2025
Merged
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
2c4a054
Support optional semicolons at the end of indented lines
jamesnw Nov 1, 2024
94f8c11
Merge branch 'main' of https://github.com/sass/dart-sass into indente…
jamesnw Nov 25, 2024
4d0e43c
Add comment, update error message
jamesnw Nov 27, 2024
dc12326
Handle each
jamesnw Nov 27, 2024
332ca09
Allow whitespace in @for, handle initial whitespace for at-rules indi…
jamesnw Dec 2, 2024
3715ee4
@content, @extend newlines
jamesnw Dec 2, 2024
8594fe5
@input newlines
jamesnw Dec 2, 2024
512304b
Whitespace for @mixin, @include
jamesnw Dec 2, 2024
c09e506
Whitespace in @media, @-moz-document, @supports
jamesnw Dec 2, 2024
1fa6ccf
Whitespace in @use and @forward
jamesnw Dec 2, 2024
9e49c3b
Whitespace in @function and @return
jamesnw Dec 2, 2024
939d2fa
Whitespace in @if
jamesnw Dec 3, 2024
d050c01
Whitespace in @while
jamesnw Dec 3, 2024
e8cf0fb
Whitespace in @at-root
jamesnw Dec 3, 2024
b6c801a
Merge branch 'main' into indented-syntax-improvements
jamesnw Dec 4, 2024
0aaa63a
Whitespace in arguments and @charset
jamesnw Dec 4, 2024
cfa30ee
+ and = syntax whitespace
jamesnw Dec 4, 2024
e6442d4
Whitespace in variable declarations
jamesnw Dec 4, 2024
0d81850
Move initial whitespace inside each at rule
jamesnw Dec 4, 2024
2a3c160
Whitespace in lists and maps
jamesnw Dec 5, 2024
65ec459
Handle whitespace in important and unaries
jamesnw Dec 5, 2024
7de5da3
Whitespace in interpolation, unblock expressionUntilComma issues
jamesnw Dec 5, 2024
85d14a9
Consume whitespace in sub-stylesheet parsers
jamesnw Dec 6, 2024
dac97ed
Merge branch 'main' of https://github.com/sass/dart-sass into indente…
jamesnw Dec 6, 2024
61304e6
Consume whitespace in parse/css. Meaningless, as it extends scss
jamesnw Dec 6, 2024
d7ee188
Whitespace in @supports
jamesnw Dec 6, 2024
976e38a
Whitespace in @media
jamesnw Dec 6, 2024
a7f439c
Handle whitespace in arg invocations
jamesnw Dec 6, 2024
14dbd8d
Whitespace in parsers
jamesnw Dec 6, 2024
c552cdd
Allow newlines in comments
jamesnw Dec 12, 2024
adc94db
Newlines in selector parse
jamesnw Dec 13, 2024
114cfa6
Require whitespace argument
jamesnw Dec 13, 2024
7e58b2d
Allow whitespace inside url parens
jamesnw Dec 13, 2024
78bd20f
Cleanup
jamesnw Dec 13, 2024
afdd5ec
Merge branch 'main' of https://github.com/sass/dart-sass into indente…
jamesnw Dec 13, 2024
13c42b2
Handle newlines in parentheses in supports conditions
jamesnw Dec 16, 2024
61b4137
Allow newlines in brackets and parens in selectors
jamesnw Dec 16, 2024
0843edd
Documentation, review
jamesnw Dec 16, 2024
5e880e3
More docs
jamesnw Dec 16, 2024
1ec13e5
Rename consumeNewlines to allowNewlines
jamesnw Dec 16, 2024
5e3db80
Fix bug in semicolons in sass
jamesnw Dec 17, 2024
08747a9
Merge branch 'main' of https://github.com/sass/dart-sass into indente…
jamesnw Dec 17, 2024
38e05bf
Merge branch 'main' of https://github.com/sass/dart-sass into indente…
jamesnw Dec 20, 2024
ba62f15
Use local whitespace functions where value is irrelevant
jamesnw Dec 30, 2024
38ea36b
Apply code suggestions to sass.dart
jamesnw Dec 30, 2024
6d69938
Allow whitespace after debug, error, warn
jamesnw Dec 30, 2024
b99d3ac
Revise whitespace in if, function and supports conditions
jamesnw Dec 30, 2024
8ad5805
Don't break inside brackets in declarations
jamesnw Dec 30, 2024
ce9522b
Whitespace in destructuring each
jamesnw Dec 30, 2024
f0f8c7a
Disallow whitespace after @charset, document _expression arg
jamesnw Dec 30, 2024
233d774
Add changelog
jamesnw Dec 31, 2024
aad4b5c
Errors on unmatched brackets
jamesnw Dec 31, 2024
cf711de
Allow whitespace after comma in memberlist
jamesnw Dec 31, 2024
f093d6a
Support whitespace and comments after semicolon
jamesnw Jan 2, 2025
efb0d4d
Exclude semicolons and comments from spans
jamesnw Jan 2, 2025
66838ca
Docs
jamesnw Jan 2, 2025
1ff011a
allowNewlines > consumeNewlines
jamesnw Jan 2, 2025
99311ad
Update pubspec to pass tests
jamesnw Jan 2, 2025
4000989
Merge branch 'main' of https://github.com/sass/dart-sass into indente…
jamesnw Jan 3, 2025
29f76df
Revisions
jamesnw Jan 3, 2025
43ee929
Consume newlines in expressionUntilComma in parentheses and maps
jamesnw Jan 3, 2025
ea8b098
Update comments
jamesnw Jan 3, 2025
3a50b08
Merge branch 'main' of https://github.com/sass/dart-sass into indente…
jamesnw Jan 6, 2025
523e38b
Style changes
nex3 Jan 14, 2025
305cc05
Merge branch 'main' of https://github.com/sass/dart-sass into indente…
jamesnw Jan 27, 2025
e1df2ad
expressionUntilComma always consumes whitespace
jamesnw Jan 28, 2025
7c6d741
Fix changelog
jamesnw Jan 29, 2025
c7cbc29
Merge branch 'main' into indented-syntax-improvements
nex3 Feb 5, 2025
d6fd656
Make this a full release
nex3 Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Whitespace in destructuring each
  • Loading branch information
jamesnw committed Dec 30, 2024
commit ce9522b2f0225ea94a083c6a26d7f3617c5e929b
6 changes: 3 additions & 3 deletions lib/src/parse/stylesheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -819,11 +819,11 @@ abstract class StylesheetParser extends Parser {
_inControlDirective = true;

var variables = [variableName()];
whitespace(allowNewlines: false);
whitespace(allowNewlines: true);
while (scanner.scanChar($comma)) {
whitespace(allowNewlines: false);
whitespace(allowNewlines: true);
variables.add(variableName());
whitespace(allowNewlines: false);
whitespace(allowNewlines: true);
}
whitespace(allowNewlines: true);
expectIdentifier("in");
Expand Down
Loading