Replace sexpresso library with own implementation #802
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replacing
sexpresso::parse()
with our own parser in theSExpression
class. See #783 for the motivation behind this change.Because we also used
sexpresso::escape()
to escape characters in strings to be serialized, I also had to replace this by our own implementation. Then I saw thatsexpresso::escape()
even replaced?
by\?
,'
by\'
and the audible bell by\a
(wtf?), which doesn't make sense to me 馃槈 So I removed these replacements, but only for LibrePCB 0.2.x to keep the 0.1.x file format as-is.Positive side effect of the own implementation: It seems to be much faster than
sexpresso::parse()
馃槂 Not an accurate measurement, but on my computer the background library scan now takes ~25% less time than before (tested only in debug mode).I just hope there are no critical bugs 馃檲 I added some unit tests and tested manually by opening/saving whole projects, at least so far it seems to work properly...