Skip to content

Commit

Permalink
[tools] Make case-insensitive numbers into the Pygments syntax hiligh…
Browse files Browse the repository at this point in the history
…tning.

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Aug 11, 2017
1 parent 1b865e5 commit 8e143a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions formatting-styles/pygments/sarllexer/sarl.py
Expand Up @@ -70,9 +70,9 @@ class SarlLexer(RegexLexer):
(r'[a-zA-Z_]\w*:', Name.Label),
(r'[a-zA-Z_$]\w*', Name),
(r'[~^*!%&\[\](){}<>\|+=:;,./?-]', Operator),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
(r'0x[0-9a-fA-F]+', Number.Hex),
(r'[0-9]+L?', Number.Integer),
(r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fFdD]?', Number.Float),
(r'0[xX][0-9a-fA-F]+', Number.Hex),
(r'[0-9]+[lL]?', Number.Integer),
(r'\n', Text)
],
'class': [
Expand Down
Expand Up @@ -212,9 +212,9 @@ protected void generate(IStyleAppendable it, Set<String> literals, Set<String> e
// Punctuation
it.appendNl("\t\t\t (r'[~^*!%&\\[\\](){}<>\\|+=:;,./?-]', Operator),"); //$NON-NLS-1$

it.appendNl("\t\t\t (r'[0-9][0-9]*\\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),"); //$NON-NLS-1$
it.appendNl("\t\t\t (r'0x[0-9a-fA-F]+', Number.Hex),"); //$NON-NLS-1$
it.appendNl("\t\t\t (r'[0-9]+L?', Number.Integer),"); //$NON-NLS-1$
it.appendNl("\t\t\t (r'[0-9][0-9]*\\.[0-9]+([eE][0-9]+)?[fFdD]?', Number.Float),"); //$NON-NLS-1$
it.appendNl("\t\t\t (r'0[xX][0-9a-fA-F]+', Number.Hex),"); //$NON-NLS-1$
it.appendNl("\t\t\t (r'[0-9]+[lL]?', Number.Integer),"); //$NON-NLS-1$
it.appendNl("\t\t\t (r'\\n', Text)"); //$NON-NLS-1$
it.appendNl("\t\t],"); //$NON-NLS-1$

Expand Down

0 comments on commit 8e143a8

Please sign in to comment.