fix: Warning for no-missing-field-initializers
Signed-off-by: Xuanwo <github@xuanwo.io>
This commit is contained in:
2
.github/workflows/build.yaml
vendored
2
.github/workflows/build.yaml
vendored
@@ -19,4 +19,4 @@ jobs:
|
||||
uses: egor-tensin/setup-mingw@v2
|
||||
|
||||
- name: build
|
||||
run: ${{ matrix.compiler }} -o scanner.o -I./src -c src/scanner.cc
|
||||
run: ${{ matrix.compiler }} -o scanner.o -I./src -c src/scanner.cc -Werror
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
}
|
||||
// manage quoted context
|
||||
if (valid_symbols[QUOTED_TEMPLATE_START] && !in_quoted_context() && lexer->lookahead == '"') {
|
||||
Context ctx = { QUOTED_TEMPLATE };
|
||||
Context ctx = { QUOTED_TEMPLATE, "" };
|
||||
context_stack.push_back(ctx);
|
||||
return accept_and_advance(lexer, QUOTED_TEMPLATE_START);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
) {
|
||||
advance(lexer);
|
||||
if (lexer->lookahead == '{') {
|
||||
Context ctx = { TEMPLATE_INTERPOLATION };
|
||||
Context ctx = { TEMPLATE_INTERPOLATION, "" };
|
||||
context_stack.push_back(ctx);
|
||||
return accept_and_advance(lexer, TEMPLATE_INTERPOLATION_START);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
) {
|
||||
advance(lexer);
|
||||
if (lexer->lookahead == '{') {
|
||||
Context ctx = { TEMPLATE_DIRECTIVE };
|
||||
Context ctx = { TEMPLATE_DIRECTIVE, "" };
|
||||
context_stack.push_back(ctx);
|
||||
return accept_and_advance(lexer, TEMPLATE_DIRECTIVE_START);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user