Skip to content

Commit

Permalink
Eiffel: Regexp optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 22, 2017
1 parent a065e61 commit e881fe3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/prism-eiffel.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Prism.languages.eiffel = {
},
// Single-line string
{
pattern: /"(?:%\s+%|%"|.)*?"/,
pattern: /"(?:%\s+%|%.|[^%"\r\n])*"/,
greedy: true
}
],
// normal char | special char | char code
'char': /'(?:%'|.)+?'/,
'char': /'(?:%.|[^%'\r\n])+'/,
'keyword': /\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,
'boolean': /\b(?:True|False)\b/i,
// Convention: class-names are always all upper-case characters
'class-name': {
'pattern': /\b[A-Z][\dA-Z_]*\b/g,
'pattern': /\b[A-Z][\dA-Z_]*\b/,
'alias': 'builtin'
},
'number': [
Expand Down
2 changes: 1 addition & 1 deletion components/prism-eiffel.min.js

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

0 comments on commit e881fe3

Please sign in to comment.