diff --git a/components/prism-purescript.js b/components/prism-purescript.js index 02cdaaab78..9abff50301 100644 --- a/components/prism-purescript.js +++ b/components/prism-purescript.js @@ -1,5 +1,5 @@ Prism.languages.purescript = Prism.languages.extend('haskell', { - 'keyword': /\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/, + 'keyword': /\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/, 'import-statement': { // The imported or hidden names are not included in this import diff --git a/components/prism-purescript.min.js b/components/prism-purescript.min.js index 04fc4edadd..afa495712a 100644 --- a/components/prism-purescript.min.js +++ b/components/prism-purescript.min.js @@ -1 +1 @@ -Prism.languages.purescript=Prism.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|as|hiding)\b/}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/}),Prism.languages.purs=Prism.languages.purescript; \ No newline at end of file +Prism.languages.purescript=Prism.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|as|hiding)\b/}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/}),Prism.languages.purs=Prism.languages.purescript; \ No newline at end of file diff --git a/tests/languages/purescript/keyword_feature.test b/tests/languages/purescript/keyword_feature.test index 339da635eb..3d47c6bc59 100644 --- a/tests/languages/purescript/keyword_feature.test +++ b/tests/languages/purescript/keyword_feature.test @@ -18,30 +18,32 @@ primitive then type where +∀ ---------------------------------------------------- [ - ["keyword", "ado"], - ["keyword", "case"], - ["keyword", "class"], - ["keyword", "data"], - ["keyword", "derive"], - ["keyword", "do"], - ["keyword", "else"], - ["keyword", "if"], - ["keyword", "in"], - ["keyword", "infixl"], - ["keyword", "infixr"], - ["keyword", "instance"], - ["keyword", "let"], - ["keyword", "module"], - ["keyword", "newtype"], - ["keyword", "of"], - ["keyword", "primitive"], - ["keyword", "then"], - ["keyword", "type"], - ["keyword", "where"] + ["keyword", "ado"], + ["keyword", "case"], + ["keyword", "class"], + ["keyword", "data"], + ["keyword", "derive"], + ["keyword", "do"], + ["keyword", "else"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "infixl"], + ["keyword", "infixr"], + ["keyword", "instance"], + ["keyword", "let"], + ["keyword", "module"], + ["keyword", "newtype"], + ["keyword", "of"], + ["keyword", "primitive"], + ["keyword", "then"], + ["keyword", "type"], + ["keyword", "where"], + ["keyword", "∀"] ] ----------------------------------------------------