Code Monkey home page Code Monkey logo

indenter's Introduction

Indenter

This is a Code preprocessing tool, written in Python, which allows you to write Code without semicolons and curly brackets i.e. Python like indentation.

New Sublime Text Package

Demo for Package

Download Here

Steps

  • Write the Code it any language without using brackets or semicolans use indentions to show code blocks
  • Run the code through Indenter Script
  • Enjoy

Supported Languages :

  • C
  • C++
  • C#
  • Java
  • Go-Lang
  • Java-Script
  • PHP
  • and many more...

Usage

Run the code through Indenter before executing or compiling it. In Terminal / Command Prompt

$ python indent.py [general commands] 

eg: $ python indent.py cc eg.c -o eg.out Also See Examples given below

example.c Contains:

#include <stdio.h>
int main()
	int i, j, rows
	printf("Enter number of rows: ")
	scanf("%d", &rows)
	for (i = 1; i <= rows; ++i)
		for (j = 1; j <= i; ++j)
			printf("* ")
		printf("\n")
	return 0

Notice how the above code has no line-ending ";" or "{}"

- To get Output in a Different File

In Terminal :$ python indent.py --output2file outfile.c example.c

License

Inspired by JavaPy

This Dependency might have bugs.

indenter's People

Contributors

omkarjc27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

indenter's Issues

Ensure compatibility with language tools

This package represents a noble attempt at fighting the ugliness of C-style syntax the one hobgoblin of the twisted language designer's mind.

I am afraid however the price for using this package is too high:
Removing curly braces and indentation represents a new syntax, hence breaking compatibility with language tools like linters.

I am not sure what road to take to solve this.
Too many languages are addressed.

At least in the case of JavaScript .map could provide a compatibility layer.
However providing those might be well outside the scope of this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.