Merge pull request #4728 from YosysHQ/emil/fix-filterlib-roundtrip

filterlib: preserve value quotes
This commit is contained in:
Martin Povišer 2024-11-12 10:54:35 +01:00 committed by GitHub
commit 915df16c84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 1 deletions

View File

@ -115,12 +115,19 @@ int LibertyParser::lexer(std::string &str)
// maybe it's a string?
if (c == '"') {
str = "";
#ifdef FILTERLIB
str += c;
#endif
while (1) {
c = f.get();
if (c == '\n')
line++;
if (c == '"')
if (c == '"') {
#ifdef FILTERLIB
str += c;
#endif
break;
}
str += c;
}
// fprintf(stderr, "LEX: string >>%s<<\n", str.c_str());