Skip to content

Commit 0e7d8dd

Browse files
committed
fix some 'clang -pedantic' warnings
1 parent 7d8ecd0 commit 0e7d8dd

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.3.1 - 2021-06-30
4+
5+
fix:
6+
* dont use c struct initializer syntax in src/scanner.cc
7+
38
## 0.3.0 - 2021-06-28
49

510
fix:

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ The directory `fuzz/crashers` contains a set of crashes that were found with fuz
4141
* [x] start with fuzzing the parser
4242
* [ ] upload fuzzing instrumentation
4343
* [ ] document fuzzing process
44-
* [ ] add parsing of crashers to CI process
44+
* [ ] quality
45+
* [ ] add CI job that ensures the parser builds on different plattforms
46+
* [ ] add CI job that parses crashers that were found during fuzzing

src/scanner.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ struct Scanner {
9595
}
9696
// manage quoted context
9797
if (valid_symbols[QUOTED_TEMPLATE_START] && !in_quoted_context() && lexer->lookahead == '"') {
98-
context_stack.push_back({ .type = QUOTED_TEMPLATE });
98+
context_stack.push_back({ QUOTED_TEMPLATE });
9999
return accept_and_advance(lexer, QUOTED_TEMPLATE_START);
100100
}
101101
if (valid_symbols[QUOTED_TEMPLATE_END] && in_quoted_context() && lexer->lookahead == '"') {
@@ -112,7 +112,7 @@ struct Scanner {
112112
) {
113113
advance(lexer);
114114
if (lexer->lookahead == '{') {
115-
context_stack.push_back({ .type = TEMPLATE_INTERPOLATION});
115+
context_stack.push_back({ TEMPLATE_INTERPOLATION });
116116
return accept_and_advance(lexer, TEMPLATE_INTERPOLATION_START);
117117
}
118118
// try to scan escape sequence
@@ -138,7 +138,7 @@ struct Scanner {
138138
identifier.push_back(lexer->lookahead);
139139
advance(lexer);
140140
}
141-
context_stack.push_back({ .type = HEREDOC_TEMPLATE, .heredoc_identifier = identifier });
141+
context_stack.push_back({ HEREDOC_TEMPLATE, identifier });
142142
return accept_inplace(lexer, HEREDOC_IDENTIFIER);
143143
}
144144
if (valid_symbols[HEREDOC_IDENTIFIER] && in_heredoc_context() && has_leading_whitespace_with_newline) {

0 commit comments

Comments
 (0)