linguist
linguist copied to clipboard
Add support for Sophia smart contract language
This PR adds support for the Sophia contract language.
Checklist:
- [x] I am adding a new language.
- [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
- Search results for each extension:
- https://github.com/search?utf8=%E2%9C%93&type=Code&ref=searchresults&q=extension%3Aaes+contract+NOT+nothack
- Search results for each extension:
- [x] I have included a real-world usage sample for all extensions added in this PR:
- Sample source(s):
- https://github.com/zxq9/linguist/blob/master/samples/Sophia/all_syntax.aes
- https://github.com/zxq9/linguist/blob/master/samples/Sophia/aeproof.aes
- https://github.com/zxq9/linguist/blob/master/samples/Sophia/Option.aes
- Sample license(s):
- ISC
- Sample source(s):
- [x] I have included a syntax highlighting grammar: https://github.com/mradkov/vscode-sophia
- [ ] I have updated the heuristics to distinguish my language from others using the same extension.
- [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
cool to see this being tackled, thanks for the PR @zxq9! 😎
in case some other real examples are needed:
- https://github.com/aeternity/dex-contracts-v2/tree/master/contracts
- https://github.com/aeternity/state-channel-demo/blob/develop/contract/contracts/RockPaperScissors.aes
- https://github.com/aeternity/aeternity-fungible-token/blob/master/contracts/fungible-token-full.aes
- https://github.com/aeternity/tipping-contract/blob/develop/contracts/v4/Tipping_v4.aes
- https://github.com/aeternity/tipping-oracle-service/blob/master/contracts/OracleService.aes
- https://github.com/aeternity/ga-multisig-contract/blob/master/contracts/SimpleGAMultiSig.aes
- https://github.com/aeternity/wordbazaar-contracts/tree/main/contracts
not sure though if https://github.com/mradkov/vscode-sophia is up to date. maybe @radrow, @ghallak or @hanssv can confirm that.
anyway, can't wait to finally see syntax highlighting for Sophia on GitHub <3
Yet another real-life example: https://github.com/aeternity/hyperchains-contract/blob/master/contracts/Election.aes
@marc0olo The VS code extension is slightly outdated (eg it lacks main
keyword and <-
from list comprehensions), but should work for most uses
Thanks for the heads up @radrow , I'll give the new syntax elements a look and update this.
@zxq9 the syntax highlighting grammar is about to be updated to the latest state 😃 see https://github.com/mradkov/vscode-sophia/pull/9
Nudge nudge @zxq9. This PR is still waiting on you. It won't be merged until you address the requested changes.
Closing as stale.