Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Cython.js #14

Merged
merged 1 commit into from
Oct 31, 2015
Merged

Create Cython.js #14

merged 1 commit into from
Oct 31, 2015

Conversation

DevynCJohnson
Copy link
Contributor

Cython is a superset of Python with additional features/abilities for C/C++ programming ( http://cython.org/ ).
I would like to contribute to more "language" files in EnlighterJS. Please feel free to provide feedback so that I can continue to help you (and comply with your coding-standards) with your project.
This "Cython.js" file is a derivative of your "Python.js" file.

Cython is a superset of Python with additional features/abilities for C/C++ programming ( http://cython.org/ ).
I would like to contribute to more "language" files in EnlighterJS. Please feel free to provide feedback so that I can continue to help you (and comply with your coding-standards) with your project.
This "Cython.js" file is a derivative of your "Python.js" file.
@AndiDittrich
Copy link
Member

Dear DevynCJohnson,

thanks for your contribution. do you have any language testcases which can be used as demo and for verification (.e.g somethink like http://enlighterjs.andidittrich.de/Language.Python.html) ?

best regards, Andi

@DevynCJohnson
Copy link
Contributor Author

Yes, I have Cython code that can be used as a small demo. How would you like me to submit the demo code? What format would you like (i.e. Cython code as plain-text, HTML page with code in pre tags, etc.)?

Would it be okay with you if I contribute additional programming languages in the future? Do you have standards/rules as to what languages are acceptable for being supported by EnlighterJS?

@AndiDittrich
Copy link
Member

All language testcases/examples are located in Resources/TestcaseData/<lang>.html as html snippet (like https://github.com/AndiDittrich/EnlighterJS/blob/master/Resources/TestcaseData/python.html).
They have to contain a simple inline example as well as a complex language testcase including as much as practicable language elements. Please add it as pull request.
Especially basic language elements are important to test the rules and the tokenizer. For example

PHP

/** String's */
echo 'this is a simple string';

echo 'You can also have embedded newlines in 
strings this way as it is \'
okay to do'; // Don't you agree

// Outputs: Arnold once said: "I'll be back"
echo 'Arnold once said: "I\'ll be back"';

/** Numbers */

$a = 1234; // decimal number
$a = -123; // a negative number
$a = 0123; // octal number (equivalent to 83 decimal)
$a = 0x1A; // hexadecimal number (equivalent to 26 decimal)
$a = 1.234; 
$b = 1.2e3; 
$c = 7E-10;

I will add a detailed description/list to the Contribution Guidelines later as well as some standards/rules.

I'm looking forward for any language contribution. Generally language files should be as small as possible (e.g. use regex instead of keywords).
What languages do you plan to contribute ? Maybe i should create a wiki page for organization pupose ?

AndiDittrich pushed a commit that referenced this pull request Oct 31, 2015
@AndiDittrich AndiDittrich merged commit a69f79a into EnlighterJS:master Oct 31, 2015
@DevynCJohnson
Copy link
Contributor Author

Okay, I created the demo Cython code. I am more than happy to make any modifications to the demo as you wish.

If it is okay with you, I would like to add

  • Squirrel
  • XNA
  • Basic/Gambas/Visual-Basic
  • and more

I use EnlighterJS on my website (DCJTech.info), which is a website about computers and programming. Obviously, I see a need for additional language support since I have articles discussing a variety of languages.

I enjoy programming and I love to help with programming projects. Please feel free to tell me if I ever do something wrong in your project. I will not be offended. I want to help while complying with your coding standards and program structure. Feel free to communicate with me using my personal email address ([email protected]), if that would be more convenient for you.

@AndiDittrich
Copy link
Member

Sounds great!

I've optimized your cython code: https://github.com/AndiDittrich/EnlighterJS/blob/master/Source/Language/Cython.js

you've only added additional keywords, right ?

@DevynCJohnson
Copy link
Contributor Author

Yes, I only added additional keywords. Cython is a subset of Python with additional C-like features.

@AndiDittrich AndiDittrich added this to the v2.10.0 milestone Oct 31, 2015
@AndiDittrich AndiDittrich self-assigned this Oct 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants