Add support for Asymptote and LTspice Symbol schematics #4372
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.
I discovered Asymptote on Wikipedia, of all places. While assessing its distribution on GitHub, I encountered an even more widespread format with the same file-extension. As both
.asy
formats qualify for registration on GitHub, they're being added together.Asymptote
Asymptote is a C++-like programming language for vector graphics generation. It's bundled as part of the TeXLive distribution, which explains the surprising number of results I found. Of the 25,327
.asy
files indexed on GitHub, I harvested 2,987 of them, the overwhelming majority of which were all Asymptote source. The others that weren't had negligible distribution:Some files were binary blobs, which I naturally removed before going through the results.
Syntax highlighting
Unfortunately, I couldn't find an Asymptote grammar that wasn't copylefted. 😢 Thankfully, C++'s grammar is a decent substitute. 👍
LTspice Symbols
Unfortunately, there's very little documentation about the format, as it's data generated by a GUI — a program named LTspice which is something to do with circuitry/electronics/hardware-schematic stuff. 😓 This was the only resource I found on LTspice's
.asy
format that shed anything insightful.Nonetheless, there are about twice as many of these files on GitHub than there are Asymptote files. 59,570 indexed results, which were narrowed down thanks to each file having a line beginning with
SymbolType
. This was also how I excluded LTspice's.asy
files from the Asymptote tally, above.Syntax highlighting
... was hacked together by me and added to the
language-pcb
repo (hence the submodule bump). Even without much knowledge of the format, highlighting it was easy thanks to the format's limited number of keywords.Checklist:
Asymptote/figarc4_3D.asy
: Source | CC licenseAsymptote/kappa-sawteeth.asy
: Source | CC licenseLTspice Symbol/random-shapes.asy
: Uhm, drawn by me in LTspice because everything I found was copylefted or unlicensed. Here's a screenshot of my masterpiece:/cc @lildude, @pchaigno for review
/cc @5N44P so he can laugh at my drawing