Skip to content

Commit c75bb51

Browse files
committed
Add more code comments for new functions
1 parent e2e555c commit c75bb51

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

parser.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ namespace Sass {
7171

7272
bool peek_newline(const char* start = 0);
7373

74+
// skip over spaces, tabs and line comments
7475
template <prelexer mx>
7576
const char* sneak(const char* start = 0)
7677
{
@@ -98,6 +99,8 @@ namespace Sass {
9899

99100
}
100101

102+
// peek will only skip over space, tabs and line comment
103+
// return the position where the lexer match will occur
101104
template <prelexer mx>
102105
const char* peek(const char* start = 0)
103106
{
@@ -116,6 +119,7 @@ namespace Sass {
116119
// some matchers don't accept certain white-space
117120
// we do not support start arg, since we manipulate
118121
// sourcemap offset and we modify the position pointer!
122+
// lex will only skip over space, tabs and line comment
119123
template <prelexer mx>
120124
const char* lex()
121125
{
@@ -149,7 +153,9 @@ namespace Sass {
149153

150154
}
151155

152-
// skips over css comments
156+
// lex_css skips over space, tabs, line and block comment
157+
// all block comments will be consumed and thrown away
158+
// source-map position will point to token after the comment
153159
template <prelexer mx>
154160
const char* lex_css()
155161
{
@@ -160,7 +166,7 @@ namespace Sass {
160166
return lex< mx >();
161167
}
162168

163-
// skips over css comments
169+
// all block comments will be skipped and thrown away
164170
template <prelexer mx>
165171
const char* peek_css(const char* start = 0)
166172
{

0 commit comments

Comments
 (0)