File tree Expand file tree Collapse file tree 4 files changed +21
-5
lines changed
Expand file tree Collapse file tree 4 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 9191 working-directory : ${{env.RELEASE_BUILD_DIR}}
9292 run : .\hktests-rel.exe --gtest_output=xml:hktests-rel.xml
9393
94- - name : Publish Test Results
94+ - name : Publish Test Results to github
9595 uses : EnricoMi/publish-unit-test-result-action/windows@v2
9696 if : always() && github.event_name == 'push' && github.ref == 'refs/heads/main'
9797 with :
@@ -106,7 +106,7 @@ jobs:
106106 token : ${{secrets.CODECOV_TOKEN}}
107107 files : ${{env.DEBUG_BUILD_DIR}}\hktests-dbg.xml
108108
109- - name : Generate CodeCoverage Report (Debug)
109+ - name : Generate CodeCoverage Report
110110 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
111111 run : |
112112 curl -L -O https://github.com/OpenCppCoverage/OpenCppCoverage/releases/download/release-0.9.9.0/OpenCppCoverageSetup-x64-0.9.9.0.exe
@@ -120,7 +120,7 @@ jobs:
120120 --working_dir=${{env.DEBUG_BUILD_DIR}} ^
121121 -- ${{env.DEBUG_BUILD_DIR}}\hktests-dbg
122122
123- - name : Upload CodeCoverage Report to codecov.io (Debug)
123+ - name : Upload CodeCoverage Report to codecov
124124 if : github.event_name == 'push' && github.ref == 'refs/heads/main'
125125 uses : codecov/codecov-action@v5
126126 with :
Original file line number Diff line number Diff line change @@ -59,7 +59,12 @@ void repository::scan_prologues(bool force)
5959 }
6060
6161 auto cursor = file_cursor (module_path);
62- m.ast = parse_module (cursor, true );
62+ auto it =
63+
64+ m.errors .clear ();
65+ if (auto r = parse_module (cursor, m.errors , true )) {
66+
67+ }
6368 }
6469
6570 untouch (true );
Original file line number Diff line number Diff line change 22#pragma once
33
44#include " ast/module_node.hpp"
5+ #include " error/error_list.hpp"
56#include < filesystem>
67#include < memory>
78#include < chrono>
@@ -36,6 +37,8 @@ class repository {
3637 */
3738 bool touched = false ;
3839
40+ error_list errors;
41+
3942 module_type (std::filesystem::path path);
4043 };
4144
Original file line number Diff line number Diff line change @@ -25,8 +25,16 @@ constexpr std::unexpected<error_code> tokens_did_not_match = std::unexpected{err
2525[[nodiscard]] parse_result<fqname> parse_fqname (token_iterator& it, error_list& e);
2626[[nodiscard]] parse_result_ptr<ast::node> parse (hk::file_cursor& c);
2727[[nodiscard]] parse_result_ptr<ast::node> parse (token_iterator& it, error_list &errors);
28- [[nodiscard]] parse_result_ptr<ast::module_node> parse_module (token_iterator& it, error_list &errors, bool only_prologue);
2928[[nodiscard]] parse_result_ptr<ast::module_declaration_node> parse_module_declaration (token_iterator& it, error_list& e);
3029[[nodiscard]] parse_result_ptr<ast::import_declaration_node> parse_import_declaration (token_iterator& it, error_list& e);
3130
31+ /* * Parse a module.
32+ *
33+ * @param it A token iterator.
34+ * @param errors[out] error list output.
35+ * @param only_prologue When true only parses the prologue of a module.
36+ * @return A module node if successful.
37+ */
38+ [[nodiscard]] parse_result_ptr<ast::module_node> parse_module (token_iterator& it, error_list &errors, bool only_prologue);
39+
3240}
You can’t perform that action at this time.
0 commit comments