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

Add Ada support #949

Closed
wants to merge 16 commits into from
Closed

Add Ada support #949

wants to merge 16 commits into from

Conversation

Lucretia
Copy link

@Lucretia Lucretia commented May 5, 2016

I've included support and examples for Ada83, Ada95, Ada 2005 and Ada 2012.

@zeitgeist87
Copy link
Collaborator

Hi @Lucretia

Every self-respecting syntax highlighter needs support for Ada. Thanks for your contribution!

The only difference between the various Ada versions is the keyword token. Would it be possible to create one language definition simply called prism-ada.js to fit them all? That is the approach we used for other languages with multiple versions.

@Lucretia
Copy link
Author

Lucretia commented May 6, 2016

I had these as one language file (with each language defined as they are now) originally, but due to the way the examples.html/js worked ending up splitting them up. I would be possible to have one definition with all keywords included for all, I suppose, but this would then mean that the interface keyword would be highlighted as a keyword even when it's not, prior to Ada 2005.

@zeitgeist87
Copy link
Collaborator

I had these as one language file (with each language defined as they are now) originally, but due to the way the examples.html/js worked ending up splitting them up.

Every language has to be in a separate file that is correct.

I would be possible to have one definition with all keywords included for all, I suppose, but this would then mean that the interface keyword would be highlighted as a keyword even when it's not, prior to Ada 2005.

Would that be so bad? The Prism language definitions don't have to be perfect. They should be small and fast. How likely is it, that somebody has some Ada-83 code with a variable named interface.

But I can see your point. Let's leave it as separate languages for now. I'll do a proper review this weekend.

@Golmote
Copy link
Contributor

Golmote commented May 6, 2016

I'm also in favor of merging all those variants into one single language (or maybe two if there is a real need). That's what we did for Pascal for example, because having too many languages would be tedious for both the maintainers and the users.

@LeaVerou
Copy link
Member

LeaVerou commented May 8, 2016

Thanks for this PR @Lucretia!
I'm also in favour of merging them. Prism is not a linter and doesn't need to be precise.
If anything, this will be harder to use, as people will be using language-ada and expecting it to just work.

@Golmote Golmote closed this in 65619f7 Jul 3, 2016
@Golmote
Copy link
Contributor

Golmote commented Jul 3, 2016

I merged them manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants