Skip to content

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 .md files 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

  1. Fork the DevLang repository to your own GitHub account
  2. Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/DevLang.git
cd DevLang
  1. Create a new branch for your changes:
git checkout -b feature/your-feature-name

Making Changes

For Code Changes

  1. Make your modifications to the relevant files:
  2. tokenizer.js - Lexical analysis
  3. parser.js - Syntax analysis and AST generation
  4. interpreter.js - Code execution
  5. tokenTypes.js - Token definitions
  6. Other supporting files as needed

  7. Test your changes thoroughly:

node devlang.js -f test_program.dev
  1. Ensure your code follows clean coding practices

For Documentation Changes

  1. Edit the Markdown files in the /docs folder
  2. Preview your changes locally (see below)

Previewing Documentation Locally

Before submitting your changes, preview how the documentation will look:

  1. Install MkDocs and Material theme (if not already installed):
pip install mkdocs mkdocs-material
  1. From the project root directory, run:
mkdocs serve
  1. 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

  1. Commit your changes with clear, descriptive messages:
git add .
git commit -m "Add feature: description of what you changed"
  1. Push your branch to your fork:
git push origin feature/your-feature-name
  1. Open a Pull Request (PR) from your branch to the original repository's main branch

  2. In your PR description:

  3. Explain what changes you made and why
  4. Reference any related issues
  5. 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:

  1. Check if the issue already exists in the GitHub Issues
  2. If not, open a new issue with:
  3. A clear, descriptive title
  4. Detailed description of the problem or suggestion
  5. Steps to reproduce (for bugs)
  6. Expected vs actual behavior
  7. 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:

  1. Add the token type in tokenTypes.js
  2. Update the tokenizer in tokenizer.js to recognize it
  3. Update the parser in parser.js to handle its syntax
  4. Update the interpreter in interpreter.js to execute it
  5. Add documentation and examples
  6. 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! 🚀