Skip to content

Commit

Permalink
fix some 'clang -pedantic' warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaHoffmann committed Jun 30, 2021
1 parent 7d8ecd0 commit 0e7d8dd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.3.1 - 2021-06-30

fix:
* dont use c struct initializer syntax in src/scanner.cc

## 0.3.0 - 2021-06-28

fix:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ The directory `fuzz/crashers` contains a set of crashes that were found with fuz
* [x] start with fuzzing the parser
* [ ] upload fuzzing instrumentation
* [ ] document fuzzing process
* [ ] add parsing of crashers to CI process
* [ ] quality
* [ ] add CI job that ensures the parser builds on different plattforms
* [ ] add CI job that parses crashers that were found during fuzzing
6 changes: 3 additions & 3 deletions src/scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct Scanner {
}
// manage quoted context
if (valid_symbols[QUOTED_TEMPLATE_START] && !in_quoted_context() && lexer->lookahead == '"') {
context_stack.push_back({ .type = QUOTED_TEMPLATE });
context_stack.push_back({ QUOTED_TEMPLATE });
return accept_and_advance(lexer, QUOTED_TEMPLATE_START);
}
if (valid_symbols[QUOTED_TEMPLATE_END] && in_quoted_context() && lexer->lookahead == '"') {
Expand All @@ -112,7 +112,7 @@ struct Scanner {
) {
advance(lexer);
if (lexer->lookahead == '{') {
context_stack.push_back({ .type = TEMPLATE_INTERPOLATION});
context_stack.push_back({ TEMPLATE_INTERPOLATION });
return accept_and_advance(lexer, TEMPLATE_INTERPOLATION_START);
}
// try to scan escape sequence
Expand All @@ -138,7 +138,7 @@ struct Scanner {
identifier.push_back(lexer->lookahead);
advance(lexer);
}
context_stack.push_back({ .type = HEREDOC_TEMPLATE, .heredoc_identifier = identifier });
context_stack.push_back({ HEREDOC_TEMPLATE, identifier });
return accept_inplace(lexer, HEREDOC_IDENTIFIER);
}
if (valid_symbols[HEREDOC_IDENTIFIER] && in_heredoc_context() && has_leading_whitespace_with_newline) {
Expand Down

0 comments on commit 0e7d8dd

Please sign in to comment.