Skip to content

Commit c7316cf

Browse files
committed
[TASK] Mark parsing-internal classes and methods as @internal
Code that uses this library is not expected to call internal parsing functionality. Communicate this with the corresponding `@internal` annotation. This allows us to boldly refactor the parser code. Part of #668
1 parent be0e7ee commit c7316cf

File tree

7 files changed

+16
-0
lines changed

7 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1515

1616
### Changed
1717

18+
- Mark parsing-internal classes and methods as `@internal` (#674)
1819
- Block installations on unsupported higher PHP versions (#691)
1920
- Improve performance of `Value::parseValue` with many delimiters by refactoring
2021
to remove `array_search()` (#413)

src/Parsing/Anchor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace Sabberworm\CSS\Parsing;
66

7+
/**
8+
* @internal
9+
*/
710
class Anchor
811
{
912
/**

src/Parsing/OutputException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
/**
88
* Thrown if the CSS parser attempts to print something invalid.
9+
*
10+
* @internal
911
*/
1012
class OutputException extends SourceException
1113
{

src/Parsing/ParserState.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use Sabberworm\CSS\Comment\Comment;
88
use Sabberworm\CSS\Settings;
99

10+
/**
11+
* @internal
12+
*/
1013
class ParserState
1114
{
1215
/**

src/Parsing/SourceException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace Sabberworm\CSS\Parsing;
66

7+
/**
8+
* @internal
9+
*/
710
class SourceException extends \Exception
811
{
912
/**

src/Parsing/UnexpectedEOFException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
* Thrown if the CSS parser encounters end of file it did not expect.
99
*
1010
* Extends `UnexpectedTokenException` in order to preserve backwards compatibility.
11+
*
12+
* @internal
1113
*/
1214
class UnexpectedEOFException extends UnexpectedTokenException {}

src/Parsing/UnexpectedTokenException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
/**
88
* Thrown if the CSS parser encounters a token it did not expect.
9+
*
10+
* @internal
911
*/
1012
class UnexpectedTokenException extends SourceException
1113
{

0 commit comments

Comments
 (0)