Awesome
<img src="/lib/images/README-EggPeggy.png" align="center"/> <h1 align="center">Legesher's Tree-Sitter-Python</h1> <blockquote align="center">💻 Code in Python 🐍using your native written ✏️language.</blockquote> <p align="center">Programming with <b>Legesher</b>'s dev tools empowers any developer to create without losing the art of innovation 💡, creativity 🎨, or collaboration 🤝 in translation. </p> <!-- DEVELOPMENT BADGES --> <p align="center" style="margin-bottom: 5px; margin-top: 5px;"> <a href="https://github.com/legesher/tree-sitter-legesher-python/actions/workflows/ci.yml"> <img src="https://github.com/legesher/tree-sitter-legesher-python/actions/workflows/ci.yml/badge.svg?style=flat-square&labelColor=black&logoColor=white" alt="Build"></a> <a href="https://david-dm.org/legesher/tree-sitter-legesher-python"> <img src="https://img.shields.io/david/legesher/tree-sitter-legesher-python?style=flat-square&labelColor=black" alt="David Dependency Status"></a> <a href="http://makeapullrequest.com"> <img src="https://img.shields.io/badge/pull_requests-welcome-brightgreen.svg?style=flat-square&labelColor=black" alt="Pull Requests Welcome"></a> <a href="https://github.com/legesher/tree-sitter-legesher-python/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22"> <img src="https://img.shields.io/badge/first--timers--only-friendly-success.svg?style=flat-square&labelColor=black" alt="First Timers Only"></a> </p> <!-- SUPPORT BADGES --> <p align="center" style="margin-bottom: 5px;> <a href="https://github.com/legesher/tree-sitter-legesher-python" alt="Repository"> <img src="https://img.shields.io/badge/Tree_Sitter_Legesher_Python-0.19.0-f58977.svg?style=flat-square&labelColor=black&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNTAxLjE3IDUwMS4xNyI+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwLXBhdGgiPjxlbGxpcHNlIGN4PSIxNzUuMjMiIGN5PSIyNTAuMTMiIHJ4PSIzNS45OC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NmZmYiLz48cGF0aCBkPSJNMjExLjEsMTIzLjgyczQ1LTIzLDU5LjY5LTIzLDEwLjQ3LDIzLDEwLjQ3LDIzWiIgZmlsbD0iI2ZmODk3NiIvPjxwYXRoIGQ9Ik0zNTIuMzYsMTE0LjY0YTkuNDMsOS40MywwLDAsMSw0LjE1LTE1Ljg5YzYuNDctMS42MSwxNi4xMi0uNzEsMzAuMDgsNy40NiwxOSwxMS4xMSwxOS4zMSwyNy4wNiwxNi4zLDM4LjM2LTEuODMsNi44OS0xMC41Niw5LjEtMTUuNjYsNC4xMloiIGZpbGw9IiMyNjI2MjYiLz48cGF0aCBkPSJNMTU0LjM5LDExNC42NGE5LjQzLDkuNDMsMCwwLDAtNC4xNS0xNS44OWMtNi40Ny0xLjYxLTE2LjEyLS43MS0zMC4wOCw3LjQ2LTE5LDExLjExLTE5LjMxLDI3LjA2LTE2LjMsMzguMzYsMS44Myw2Ljg5LDEwLjU2LDkuMSwxNS42Niw0LjEyWiIgZmlsbD0iIzI2MjYyNiIvPjwvZz48L2c+PC9zdmc+" /></a> <!-- <a href="https://github.com/legesher/tree-sitter-legesher-python/graphs/contributors" alt="Contributors"> <img src="https://img.shields.io/github/contributors/legesher/tree-sitter-legesher-python?style=flat-square&color=f58977&labelColor=black" /></a> --> <a href="#the-community" alt="All Contributors"> <img src="https://img.shields.io/badge/all_contributors-12-black?style=flat-square&color=f58977&labelColor=black" /></a> <a href="https://instagram.com/withmadico" alt="Sponsors on Github"> <img src="https://img.shields.io/badge/sponsor-@withmadico-black?style=flat-square&color=f58977&labelColor=black" /></a> </p> <!-- SOCIAL BADGES --> <p align="center"> <a href="https://github.com/legesher"> <img src="https://img.shields.io/badge/-Contribute-black?style=flat-square&logo=github&logoColor=7ed2e7" alt="Contribute on Github"></a> <a href="https://twitch.tv/withmadico"> <img src="https://img.shields.io/badge/-Watch-black?style=flat-square&logo=twitch&logoColor=7ed2e7" alt="Watch on Twitch"></a> <a href="https://discord.gg/DkVjVDP"> <img src="https://img.shields.io/badge/-Chat-black?style=flat-square&logo=discord&logoColor=7ed2e7" alt="chat on Discord"></a> <a href="https://www.instagram.com/legesher/"> <img src="https://img.shields.io/badge/-Connect-black?style=flat-square&logo=instagram&logoColor=7ed2e7" alt="follow on Instagram"></a> <a href="https://twitter.com/intent/follow?screen_name=legesherio"> <img src="https://img.shields.io/badge/-Tweet-black?style=flat-square&logo=twitter&logoColor=7ed2e7" alt="follow on Twitter"></a> <a href="https://medium.com/@legesher"> <img src="https://img.shields.io/badge/-Read-black?style=flat-square&logo=medium&logoColor=7ed2e7" alt="Read on Medium"></a> <a href="https://legesher.io"> <img src="https://img.shields.io/badge/-Subscribe-black?style=flat-square&logo=mailchimp&logoColor=7ed2e7" alt="Subscribe on Mailchimp"></a> </p> <!-- SOCIAL MEDIA -->Introduction
tree-sitter-legesher-python
🌳 is the written language interchangeable version of the tree-sitter grammar for the python language used by text editors such as Atom. This npm package is used by language-legesher-python
to enable you to code in the language you natively use.
📢 Check if your native language is available in the Legesher translation repository! If not, we'd love your help to add it!!
Getting Started
In order to use the tree-sitter-legesher-python
grammar to code, you will need to follow the following steps:
1️⃣ Download Atom (a text editor)
Head on over to Atom.io to download the latest version of the text editor.
2️⃣ Update Preferences
Once installed on your local computer, open the Atom application. In the options in the top menu bar, navigate to Atom's Settings Atom > Preferences... . A settings window should pop up in your editor.
3️⃣ Disable Atom's language-python
Continue by clicking the Packages section. Here, you'll see a number of items: Installed Packages, Community Packages, Core Packages, Development Packages, Git Packages. Using the search bar, type language-python
to find the Core Package currently installed on your text editor. Click Disable.
4️⃣ Download Legesher's language-legesher-python
Now, head to the Install section to install a new package to your text editor (make sure that the Packages button is selected instead of the Themes). Type language-legesher-python
in the search bar to find Legesher's package, and click Install.
5️⃣ Enable Legesher's language-legesher-python
Sometimes you'll have to enable a newly installed package by clicking the Enable button in the package when it is within the Packages section of the settings.
6️⃣ Write A "Hello World" Program In Your Language
Now, you can start coding in Python using any written language currently available within Legesher's translation library! The syntax highlighting should match as if you were coding Python in English!
def main():
print "Hello World"
Contributing
❤️Legesher relies on the passionate members of its community (both developer and non-developer alike) to keep delivering impactful tools to people all over the world.
Before contributing, be sure to consult Legesher's contribution guidelines and language translation conventions. As a member of our community, you must abide by our Code Of Conduct.
Installation
1️⃣ Fork the legesher/tree-sitter-legesher-python repository
Follow these instructions on how to fork a repository
2️⃣ Cloning the repository
Once you have set up your fork of the legesher/tree-sitter-legesher-python
repository, you'll want to clone it to your local machine. This is so you can make and test all of your personal edits before adding it to the master version of legesher/tree-sitter-legesher-python
.
Navigate to the location on your computer where you want to host your code. Once in the appropriate folder, run the following command to clone the repository to your local machine.
git clone git@github.com:your-username/tree-sitter-legesher-python.git
3️⃣ Bootstrapping the repository
You'll then want to navigate within the folder that was just created that contains all of the content of the forked repository. There you'll want to run the installation script to get the updated version of all the dependencies.
cd tree-sitter-legesher-python
npm install
Development
We love your desire to give back, and want to make the process as welcoming to newcomers and experts as possible. We're working on developing more intuitive tutorials for individuals of all skill levels and expertise, so if you think the community would value from being walked through the steps you're going through please share! ❤️
Test Changes
When you start making changes to the code on your local branch, you'll need to test those changes. Before your code can be accepted into the master branch, it will have to pass all of the tests within /examples/*
. To check the updates made to the grammar, run the following commands:
1️⃣ Save Current Changes
When you get to a point when you want to test the functionality of the code, make sure all your changes are saved. ❗They don't necessarily have to be committed changes in order to test them.
2️⃣ Generate the updated tree-sitter parser
You'll need to generate a new tree-sitter grammar whenever you make changes in this repository. Running this command will usually update files within the /src/*
folder.
tree-sitter generate
3️⃣ Configure the grammar
This command makes sure the binding information for the grammar is properly set up and configured.
node-gyp configure
4️⃣ Build the grammar Using the newly configured bindings, we can now build the new grammar with your changes.
node-gyp build
5️⃣ Test changes
To make sure that the grammar is properly updated, run the tests. If you add elements that do not have tests to prove whether they work correctly or not, please include them in your pull request.
tree-sitter test
References
This repository is a forked extension of tree-sitter's tree-sitter-python
. This package works alongside the language repository language-legesher-python
. These two repositories work closely together, so it may be useful to touch up on both repositories' documentation.
The Python Language
The Community
Meet our community (full of contributors, backers, sponsors, and supporters) that give a little piece of their heart to this project. Thank you so much. (emoji key)
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="http://withmadi.co"><img src="https://avatars0.githubusercontent.com/u/7844510?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Madison (Pfaff) Edgar</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/commits?author=madiedgar" title="Code">💻</a> <a href="https://github.com/legesher/tree-sitter-legesher-python/issues?q=author%3Amadiedgar" title="Bug reports">🐛</a> <a href="#projectManagement-madiedgar" title="Project Management">📆</a></td> <td align="center"><a href="https://github.com/wescran"><img src="https://avatars2.githubusercontent.com/u/36459418?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wesley Cranston</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/commits?author=wescran" title="Code">💻</a> <a href="#marketing-wescran" title="Marketing - People who help in marketing the repo/project">💌</a></td> <td align="center"><a href="https://github.com/dolphincodes"><img src="https://avatars0.githubusercontent.com/u/31311145?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dolphincodes</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/commits?author=dolphincodes" title="Documentation">📖</a></td> <td align="center"><a href="https://github.com/LeonardoFurtado"><img src="https://avatars3.githubusercontent.com/u/22118060?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Leonardo Furtado</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/commits?author=LeonardoFurtado" title="Documentation">📖</a></td> <td align="center"><a href="https://github.com/Eshan-Agarwal"><img src="https://avatars0.githubusercontent.com/u/47007275?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eshan Agarwal</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/commits?author=Eshan-Agarwal" title="Documentation">📖</a></td> <td align="center"><a href="http://mythreya.dev"><img src="https://avatars1.githubusercontent.com/u/26112391?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mythreya Kuricheti</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/issues?q=author%3AMythreyaK" title="Bug reports">🐛</a></td> <td align="center"><a href="https://github.com/jonathan-alvaro"><img src="https://avatars2.githubusercontent.com/u/13015661?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jonathan Alvaro</b></sub></a><br /><a href="#marketing-jonathan-alvaro" title="Marketing - People who help in marketing the repo/project">💌</a></td> </tr> <tr> <td align="center"><a href="https://github.com/zeesh-ali"><img src="https://avatars1.githubusercontent.com/u/26367273?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Zeeshan Ali</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/commits?author=zeesh-ali" title="Documentation">📖</a></td> <td align="center"><a href="https://github.com/andres-posadas"><img src="https://avatars2.githubusercontent.com/u/50717533?v=4?s=100" width="100px;" alt=""/><br /><sub><b>andres-posadas</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/commits?author=andres-posadas" title="Documentation">📖</a></td> <td align="center"><a href="https://blenderbell.artstation.com/"><img src="https://avatars3.githubusercontent.com/u/32410407?v=4?s=100" width="100px;" alt=""/><br /><sub><b>calra123</b></sub></a><br /><a href="https://github.com/legesher/tree-sitter-legesher-python/commits?author=calra123" title="Code">💻</a></td> <td align="center"><a href="https://github.com/AjaiDubey"><img src="https://avatars3.githubusercontent.com/u/44136561?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ajai Dubey</b></sub></a><br /><a href="#ideas-AjaiDubey" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center"><a href="https://github.com/alxnull"><img src="https://avatars1.githubusercontent.com/u/26907770?v=4?s=100" width="100px;" alt=""/><br /><sub><b>alxnull</b></sub></a><br /><a href="#maintenance-alxnull" title="Maintenance">🚧</a></td> </tr> </table> <!-- markdownlint-restore --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->This project follows the all-contributors specification. Contributions of any kind are welcome and recognized. ✨