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

[julia] Update keywords, built_in and literals for julia 1.X. #2781

Merged
merged 1 commit into from Oct 25, 2020

Conversation

fredrikekre
Copy link
Contributor

@fredrikekre fredrikekre commented Oct 23, 2020

Changes

This updates the lists of keyword, built_in and literal for Julia 1.X. Julia 1.X was released over 2 years ago so (IMO) it should be safe to remove the old tokens that are not applicable any more, but I don't know what your policy is for such things.

Checklist

@fredrikekre
Copy link
Contributor Author

@fredrikekre fredrikekre commented Oct 23, 2020

CC @mortenpi @tlienart, you might be interested in this.

@joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Oct 23, 2020

Thanks for this! While we're at can we go ahead and move the words into one-word per line arrays to increase the visibility and ease of future maintenance? IE:

const LITERALS = [
   "true",
   "false",
  // one word per line, etc.
]
keywords : {
  literal: LITERALS.join(" "),
  // ...

You can see examples with javascript.js and ecmascript.js...

@joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Oct 24, 2020

it should be safe to remove the old tokens that are not applicable any more, but I don't know what your policy is for such things.

We'd usually leave them if there is a chance they're still in use in the world or old code snippets but since these lists are auto-generated I don't mind if we drop the older keywords since as you say it's been quite some time.

@fredrikekre
Copy link
Contributor Author

@fredrikekre fredrikekre commented Oct 24, 2020

Thanks, I updated the PR.

src/languages/julia.js Outdated Show resolved Hide resolved
@joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Oct 24, 2020

Awesome. Almost there! :-)

@fredrikekre
Copy link
Contributor Author

@fredrikekre fredrikekre commented Oct 25, 2020

Added some new stuff to test/detect, and also noticed that some duplicates where included by my scripts, so fixed that too.

@joshgoebel joshgoebel added the hacktoberfest-accepted label Oct 25, 2020
@joshgoebel joshgoebel merged commit 23a90df into highlightjs:master Oct 25, 2020
1 check passed
@joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Oct 25, 2020

@fredrikekre Thanks so much for contributing!

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

Successfully merging this pull request may close these issues.

None yet

2 participants