Skip to content

Commit

Permalink
Add links for example parsers to doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Aug 17, 2015
1 parent 17a9ac2 commit 9f30b06
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can provide 3 types of package:

## Syntax

Good example of syntax is SCSS. Some users may want to change properties order
Good example of syntax is [SCSS]. Some users may want to change properties order
or add prefixes directly to SCSS sources. So we need SCSS input and output.

Syntax API is very simple. It is just a object with `parse` and `stringify`
Expand All @@ -27,9 +27,11 @@ module.exports = {
};
```

[SCSS]: https://github.com/postcss/postcss-scss

## Parser

Main example of parse is Safe Parser, to parse broken CSS. There is not sense
Main example of parse is [Safe Parser], to parse broken CSS. There is not sense
to generate string with broken CSS, so package should provide only parser.

Parser API is a function, that receives string and returns `Root` node.
Expand All @@ -45,6 +47,8 @@ module.exports = function (css, opts) {
};
```

[Safe Parser]: https://github.com/postcss/postcss-safe-parser

TODO: parser theory look and current one (copy paste is OK)

TODO: reuse Parser and tests
Expand Down

0 comments on commit 9f30b06

Please sign in to comment.