linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Add support for Sophia smart contract language

Open zxq9 opened this issue 1 year ago • 4 comments

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
    • [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
    • [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.

zxq9 avatar Jul 19 '22 12:07 zxq9

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

marc0olo avatar Jul 28 '22 20:07 marc0olo

Yet another real-life example: https://github.com/aeternity/hyperchains-contract/blob/master/contracts/Election.aes

radrow avatar Jul 29 '22 06:07 radrow

@marc0olo The VS code extension is slightly outdated (eg it lacks main keyword and <- from list comprehensions), but should work for most uses

radrow avatar Jul 29 '22 06:07 radrow

Thanks for the heads up @radrow , I'll give the new syntax elements a look and update this.

zxq9 avatar Aug 01 '22 14:08 zxq9

@zxq9 the syntax highlighting grammar is about to be updated to the latest state 😃 see https://github.com/mradkov/vscode-sophia/pull/9

marc0olo avatar Oct 26 '22 16:10 marc0olo

Nudge nudge @zxq9. This PR is still waiting on you. It won't be merged until you address the requested changes.

lildude avatar Feb 17 '23 10:02 lildude

Closing as stale.

lildude avatar Jun 06 '23 08:06 lildude