Skip to content

Commit feb1b6f

Browse files
dovisutumAAdhaTTah
authored andcommitted
Add the 'struct' keyword to Julia (#1941)
Added to the key word list and updated tests.
1 parent 363281b commit feb1b6f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

components/prism-julia.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Prism.languages.julia= {
44
lookbehind: true
55
},
66
'string': /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,
7-
'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/,
7+
'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/,
88
'boolean' : /\b(?:true|false)\b/,
99
'number' : /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,
1010
'operator': /[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~]/,

components/prism-julia.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/languages/julia/keyword_feature.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ immutable import importall in
88
let local macro module
99
print println quote
1010
return try type
11+
struct
1112
typealias using while
1213

1314
----------------------------------------------------
@@ -23,6 +24,7 @@ typealias using while
2324
["keyword", "let"], ["keyword", "local"], ["keyword", "macro"], ["keyword", "module"],
2425
["keyword", "print"], ["keyword", "println"], ["keyword", "quote"],
2526
["keyword", "return"], ["keyword", "try"], ["keyword", "type"],
27+
["keyword", "struct"],
2628
["keyword", "typealias"], ["keyword", "using"], ["keyword", "while"]
2729
]
2830

0 commit comments

Comments
 (0)