Skip to content

Commit

Permalink
Add the 'struct' keyword to Julia (#1941)
Browse files Browse the repository at this point in the history
Added to the key word list and updated tests.
  • Loading branch information
dovisutu authored and mAAdhaTTah committed Jun 12, 2019
1 parent 363281b commit feb1b6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/prism-julia.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Prism.languages.julia= {
lookbehind: true
},
'string': /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,
'keyword' : /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/,
'keyword' : /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,
'boolean' : /\b(?:true|false)\b/,
'number' : /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,
'operator': /[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-julia.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tests/languages/julia/keyword_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ immutable import importall in
let local macro module
print println quote
return try type
struct
typealias using while

----------------------------------------------------
Expand All @@ -23,6 +24,7 @@ typealias using while
["keyword", "let"], ["keyword", "local"], ["keyword", "macro"], ["keyword", "module"],
["keyword", "print"], ["keyword", "println"], ["keyword", "quote"],
["keyword", "return"], ["keyword", "try"], ["keyword", "type"],
["keyword", "struct"],
["keyword", "typealias"], ["keyword", "using"], ["keyword", "while"]
]

Expand Down

0 comments on commit feb1b6f

Please sign in to comment.