Skip to content

Commit

Permalink
Merge pull request #782 from MakeNowJust/remove-undef
Browse files Browse the repository at this point in the history
Crystal dosen't have `undef` keyword since v0.8.0
  • Loading branch information
Golmote committed Sep 30, 2015
2 parents 4303c94 + f178a64 commit 414848d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/prism-crystal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function(Prism) {
Prism.languages.crystal = Prism.languages.extend('ruby', {
keyword: [
/\b(?:abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|rescue|return|require|self|sizeof|struct|super|then|type|typeof|undef|union|unless|until|when|while|with|yield|__DIR__|__FILE__|__LINE__)\b/,
/\b(?:abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|rescue|return|require|self|sizeof|struct|super|then|type|typeof|union|unless|until|when|while|with|yield|__DIR__|__FILE__|__LINE__)\b/,
{
pattern: /(\.\s*)(?:is_a|responds_to)\?/,
lookbehind: true
Expand Down
4 changes: 2 additions & 2 deletions tests/languages/crystal/keyword_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lib macro module next of out pointerof
private protected rescue
.responds_to?
return require self sizeof struct super
then type typeof undef union unless until when
then type typeof union unless until when
while with yield __DIR__ __FILE__ __LINE__

----------------------------------------------------
Expand All @@ -24,7 +24,7 @@ while with yield __DIR__ __FILE__ __LINE__
["keyword", "private"], ["keyword", "protected"], ["keyword", "rescue"],
["punctuation", "."], ["keyword", "responds_to?"],
["keyword", "return"], ["keyword", "require"], ["keyword", "self"], ["keyword", "sizeof"], ["keyword", "struct"], ["keyword", "super"],
["keyword", "then"], ["keyword", "type"], ["keyword", "typeof"], ["keyword", "undef"], ["keyword", "union"], ["keyword", "unless"], ["keyword", "until"], ["keyword", "when"],
["keyword", "then"], ["keyword", "type"], ["keyword", "typeof"], ["keyword", "union"], ["keyword", "unless"], ["keyword", "until"], ["keyword", "when"],
["keyword", "while"], ["keyword", "with"], ["keyword", "yield"], ["keyword", "__DIR__"], ["keyword", "__FILE__"], ["keyword", "__LINE__"]
]

Expand Down

0 comments on commit 414848d

Please sign in to comment.