Closes #25
This commit is contained in:
1 parent
e555ebb571
commit
849ce31e2f
17 files changed
+675
-35
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user