diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9dcdf08..99d5f65 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 diff --git a/src/scanner.cc b/src/scanner.cc index 3780e9c..178da9c 100644 --- a/src/scanner.cc +++ b/src/scanner.cc @@ -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); }