Contributing to DevLang
Thank you for your interest in improving DevLang! We welcome contributions from everyone, whether you are fixing typos, clarifying explanations, adding new features, or improving the language itself.
Here's how you can help:
Ways to Contribute
1. Documentation
All documentation files are Markdown (.md) files located inside the /docs folder in the repository.
- Edit relevant
.mdfiles to improve clarity - Add examples to help users understand features better
- Fix typos, grammar, or outdated information
- Create tutorials or guides for specific use cases
2. Code Contributions
- Add new keywords or language features
- Improve the tokenizer, parser, or interpreter
- Fix bugs or optimize performance
- Write tests for existing functionality
- Add support for new operators or data types
3. Examples and Sample Programs
- Create interesting example programs in DevLang
- Add practical use cases that demonstrate language features
- Write sample projects that showcase DevLang's capabilities
Getting Started
Fork and Clone
- Fork the DevLang repository to your own GitHub account
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/DevLang.git
cd DevLang
- Create a new branch for your changes:
git checkout -b feature/your-feature-name
Making Changes
For Code Changes
- Make your modifications to the relevant files:
tokenizer.js- Lexical analysisparser.js- Syntax analysis and AST generationinterpreter.js- Code executiontokenTypes.js- Token definitions-
Other supporting files as needed
-
Test your changes thoroughly:
node devlang.js -f test_program.dev
- Ensure your code follows clean coding practices
For Documentation Changes
- Edit the Markdown files in the
/docsfolder - Preview your changes locally (see below)
Previewing Documentation Locally
Before submitting your changes, preview how the documentation will look:
- Install MkDocs and Material theme (if not already installed):
pip install mkdocs mkdocs-material
- From the project root directory, run:
mkdocs serve
- Open your browser at http://127.0.0.1:8000/ to see a live preview
When you save your Markdown files, the preview will update automatically.
Submitting Changes
- Commit your changes with clear, descriptive messages:
git add .
git commit -m "Add feature: description of what you changed"
- Push your branch to your fork:
git push origin feature/your-feature-name
-
Open a Pull Request (PR) from your branch to the original repository's
mainbranch -
In your PR description:
- Explain what changes you made and why
- Reference any related issues
- Include screenshots if applicable (for documentation changes)
We review all pull requests promptly and provide feedback if necessary.
Reporting Issues or Suggesting Features
If you find bugs, have questions, or want to suggest new features:
- Check if the issue already exists in the GitHub Issues
- If not, open a new issue with:
- A clear, descriptive title
- Detailed description of the problem or suggestion
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Your environment (Node.js version, OS, etc.)
Code Style Guidelines
- Use meaningful variable and function names
- Add comments to explain complex logic
- Keep functions small and focused
- Follow existing code patterns in the project
- Test your changes before submitting
Adding New Keywords
If you want to add a new Hindi keyword:
- Add the token type in
tokenTypes.js - Update the tokenizer in
tokenizer.jsto recognize it - Update the parser in
parser.jsto handle its syntax - Update the interpreter in
interpreter.jsto execute it - Add documentation and examples
- Update the keywords reference in
docs/keywords.md
Our Commitment
We believe in open and collaborative development to make programming more accessible through Hindi keywords. Your feedback and contributions make this project better for the whole community!
Thank you for being part of the DevLang community!
Happy coding! 🚀