Skip to content

Commit 559ee8b

Browse files
committed
clang-format of headers
1 parent 189e842 commit 559ee8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4402
-2816
lines changed

include/sass.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55

66
// include API headers
77
#include <sass/base.h>
8-
#include <sass/version.h>
9-
#include <sass/values.h>
10-
#include <sass/functions.h>
118
#include <sass/context.h>
9+
#include <sass/functions.h>
10+
#include <sass/values.h>
11+
#include <sass/version.h>
1212
#include <sass2scss.h>
1313

1414
#endif
15-

include/sass2scss.h

+71-72
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@
99

1010
#ifdef _WIN32
1111

12-
/* You should define ADD_EXPORTS *only* when building the DLL. */
13-
#ifdef ADD_EXPORTS
14-
#define ADDAPI __declspec(dllexport)
15-
#define ADDCALL __cdecl
16-
#else
17-
#define ADDAPI
18-
#define ADDCALL
19-
#endif
12+
/* You should define ADD_EXPORTS *only* when building the DLL. */
13+
#ifdef ADD_EXPORTS
14+
#define ADDAPI __declspec(dllexport)
15+
#define ADDCALL __cdecl
16+
#else
17+
#define ADDAPI
18+
#define ADDCALL
19+
#endif
2020

2121
#else /* _WIN32 not defined. */
2222

23-
/* Define with no value on non-Windows OSes. */
24-
#define ADDAPI
25-
#define ADDCALL
23+
/* Define with no value on non-Windows OSes. */
24+
#define ADDAPI
25+
#define ADDCALL
2626

2727
#endif
2828

2929
#ifdef __cplusplus
3030

31-
#include <stack>
32-
#include <string>
3331
#include <cstring>
34-
#include <sstream>
3532
#include <iostream>
33+
#include <sstream>
34+
#include <stack>
35+
#include <string>
3636

3737
#ifndef SASS2SCSS_VERSION
3838
// Hardcode once the file is copied from
@@ -44,74 +44,73 @@
4444
namespace Sass
4545
{
4646

47-
// pretty print options
48-
const int SASS2SCSS_PRETTIFY_0 = 0;
49-
const int SASS2SCSS_PRETTIFY_1 = 1;
50-
const int SASS2SCSS_PRETTIFY_2 = 2;
51-
const int SASS2SCSS_PRETTIFY_3 = 3;
52-
53-
// remove one-line comment
54-
const int SASS2SCSS_KEEP_COMMENT = 32;
55-
// remove multi-line comments
56-
const int SASS2SCSS_STRIP_COMMENT = 64;
57-
// convert one-line to multi-line
58-
const int SASS2SCSS_CONVERT_COMMENT = 128;
59-
60-
// String for finding something interesting
61-
const std::string SASS2SCSS_FIND_WHITESPACE = " \t\n\v\f\r";
62-
63-
// converter struct
64-
// holding all states
65-
struct converter
66-
{
67-
// bit options
68-
int options;
69-
// is selector
70-
bool selector;
71-
// concat lists
72-
bool comma;
73-
// has property
74-
bool property;
75-
// has semicolon
76-
bool semicolon;
77-
// comment context
78-
std::string comment;
79-
// flag end of file
80-
bool end_of_file;
81-
// whitespace buffer
82-
std::string whitespace;
83-
// context/block stack
84-
std::stack<std::string> indents;
85-
};
86-
87-
// function only available in c++ code
88-
char* sass2scss (const std::string& sass, const int options);
89-
47+
// pretty print options
48+
const int SASS2SCSS_PRETTIFY_0 = 0;
49+
const int SASS2SCSS_PRETTIFY_1 = 1;
50+
const int SASS2SCSS_PRETTIFY_2 = 2;
51+
const int SASS2SCSS_PRETTIFY_3 = 3;
52+
53+
// remove one-line comment
54+
const int SASS2SCSS_KEEP_COMMENT = 32;
55+
// remove multi-line comments
56+
const int SASS2SCSS_STRIP_COMMENT = 64;
57+
// convert one-line to multi-line
58+
const int SASS2SCSS_CONVERT_COMMENT = 128;
59+
60+
// String for finding something interesting
61+
const std::string SASS2SCSS_FIND_WHITESPACE = " \t\n\v\f\r";
62+
63+
// converter struct
64+
// holding all states
65+
struct converter
66+
{
67+
// bit options
68+
int options;
69+
// is selector
70+
bool selector;
71+
// concat lists
72+
bool comma;
73+
// has property
74+
bool property;
75+
// has semicolon
76+
bool semicolon;
77+
// comment context
78+
std::string comment;
79+
// flag end of file
80+
bool end_of_file;
81+
// whitespace buffer
82+
std::string whitespace;
83+
// context/block stack
84+
std::stack<std::string> indents;
85+
};
86+
87+
// function only available in c++ code
88+
char* sass2scss(const std::string& sass, const int options);
9089
}
9190
// EO namespace
9291

9392
// declare for c
9493
extern "C" {
9594
#endif
9695

97-
// prettyfy print options
98-
#define SASS2SCSS_PRETTIFY_0 0
99-
#define SASS2SCSS_PRETTIFY_1 1
100-
#define SASS2SCSS_PRETTIFY_2 2
101-
#define SASS2SCSS_PRETTIFY_3 3
96+
// prettyfy print options
97+
#define SASS2SCSS_PRETTIFY_0 0
98+
#define SASS2SCSS_PRETTIFY_1 1
99+
#define SASS2SCSS_PRETTIFY_2 2
100+
#define SASS2SCSS_PRETTIFY_3 3
102101

103-
// keep one-line comments
104-
#define SASS2SCSS_KEEP_COMMENT 32
105-
// remove multi-line comments
106-
#define SASS2SCSS_STRIP_COMMENT 64
107-
// convert one-line to multi-line
108-
#define SASS2SCSS_CONVERT_COMMENT 128
102+
// keep one-line comments
103+
#define SASS2SCSS_KEEP_COMMENT 32
104+
// remove multi-line comments
105+
#define SASS2SCSS_STRIP_COMMENT 64
106+
// convert one-line to multi-line
107+
#define SASS2SCSS_CONVERT_COMMENT 128
109108

110-
// available to c and c++ code
111-
ADDAPI char* ADDCALL sass2scss (const char* sass, const int options);
109+
// available to c and c++ code
110+
ADDAPI char* ADDCALL sass2scss(const char* sass, const int options);
112111

113-
// Get compiled sass2scss version
114-
ADDAPI const char* ADDCALL sass2scss_version(void);
112+
// Get compiled sass2scss version
113+
ADDAPI const char* ADDCALL sass2scss_version(void);
115114

116115
#ifdef __cplusplus
117116
} // __cplusplus defined.

0 commit comments

Comments
 (0)