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

Add documentation comment collection to AST #548

Merged
merged 14 commits into from
Dec 21, 2018
Merged

Conversation

nshahan
Copy link
Contributor

@nshahan nshahan commented Dec 15, 2018

This adds documentation comment collection to Variables, Functions and Mixins.

@nshahan nshahan requested a review from nex3 December 15, 2018 00:50
lib/src/ast/sass/statement/callable_declaration.dart Outdated Show resolved Hide resolved
lib/src/ast/sass/statement/callable_declaration.dart Outdated Show resolved Hide resolved
lib/src/ast/sass/statement/callable_declaration.dart Outdated Show resolved Hide resolved
lib/src/ast/sass/statement/silent_comment.dart Outdated Show resolved Hide resolved
lib/src/parse/scss.dart Outdated Show resolved Hide resolved
lib/src/parse/scss.dart Outdated Show resolved Hide resolved
lib/src/parse/stylesheet.dart Outdated Show resolved Hide resolved
lib/src/parse/stylesheet.dart Outdated Show resolved Hide resolved
lib/src/parse/stylesheet.dart Outdated Show resolved Hide resolved
Copy link
Contributor

@nex3 nex3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple style nits, then LGTM.

lib/src/ast/sass/statement/variable_declaration.dart Outdated Show resolved Hide resolved
lib/src/ast/sass/statement/variable_declaration.dart Outdated Show resolved Hide resolved
Fixes issue where lines after the first had leading whitespace when the comment started on an indented line.
Also add support for indented syntax to use '///' as the comment prefix applied to following indented lines.
Similar tests in both SCSS and indented syntax.
@nshahan
Copy link
Contributor Author

nshahan commented Dec 19, 2018

@nex3 PTAL at the tests I added and the changes made to parsing the silent comments in the indented syntax.

lib/src/ast/sass/statement/silent_comment.dart Outdated Show resolved Hide resolved
lib/src/parse/sass.dart Outdated Show resolved Hide resolved
lib/src/parse/sass.dart Outdated Show resolved Hide resolved
lib/src/parse/sass.dart Outdated Show resolved Hide resolved
lib/src/parse/sass.dart Outdated Show resolved Hide resolved
test/doc_comments_test.dart Outdated Show resolved Hide resolved
test/doc_comments_test.dart Outdated Show resolved Hide resolved
test/doc_comments_test.dart Outdated Show resolved Hide resolved
test/doc_comments_test.dart Show resolved Hide resolved
test/doc_comments_test.dart Show resolved Hide resolved
Fix loop labels to break from the outer loop earlier when indentation level decreases.
}
outer:
do {
var commentPrefix = scanner.scanChar($slash) ? "///" : "//";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much nicer 👍

@nshahan nshahan changed the title First cut at adding doc comment collection to AST Add documentation comment collection to AST Dec 21, 2018
@nshahan nshahan merged commit 3a493f2 into sass:master Dec 21, 2018
@nshahan nshahan deleted the doc-comments branch December 21, 2018 00:08
nshahan added a commit to nshahan/dart-sass that referenced this pull request Jan 3, 2019
Originally added in sass#548 but after changes during review it is no longer needed.
@nshahan nshahan mentioned this pull request Jan 3, 2019
nshahan added a commit that referenced this pull request Jan 3, 2019
Originally added in #548 but after changes during review it is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants