This commit is contained in:
deeaitch committed 2026-10-20 13:21:43 -04:00
1 parent e555ebb571
commit 849ce31e2f
17 files changed
+675 -35

No files matched your search

+12
View File
@@ -37,6 +37,11 @@ public:
DbcDiagnostic diagnostic;
};
struct PendingAttribute {
std::string statement;
std::size_t lineNumber;
};
/** Mutable state belonging to one file parse. Handlers do not retain it. */
struct DbcParseContext {
DbcDatabase &database;
@@ -51,6 +56,9 @@ struct DbcParseContext {
std::vector<PendingComment> pendingComments = {};
void ResolveComments(const std::string &filePath);
std::vector<PendingAttribute> pendingAttributes = {};
void ResolveAttributes(const std::string &filePath, std::vector<DbcDiagnostic> &diagnostics);
void ResolveValueDescriptions(const std::string &filePath);
};
@@ -79,7 +87,11 @@ private:
class DbcCommentHandler : public DbcStatementHandler {
public:
void Handle(const std::string &line, DbcParseContext &context) const override;
};
class DbcAttributeHandler : public DbcStatementHandler {
public:
void Handle(const std::string &line, DbcParseContext &context) const override;
};
class DbcValueDescriptionHandler : public DbcStatementHandler {