summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLydia Duncan <lydia.duncan16@gmail.com>2015-07-16 14:20:43 -0700
committerLydia Duncan <lydia.duncan16@gmail.com>2015-07-16 14:20:43 -0700
commit65b1cbc5c794904e24adafeb40873c669ec285d8 (patch)
treeab59897a0452ab8c3d3d9d8ad42ae0cabaa03911
parentc8c042e3f06e4caea4f0e07318343dbc2eba8176 (diff)
downloadpygments-65b1cbc5c794904e24adafeb40873c669ec285d8.tar.gz
Add private and public keywords to Chapel lexer and example program.
-rw-r--r--pygments/lexers/chapel.py7
-rw-r--r--tests/examplefiles/99_bottles_of_beer.chpl13
2 files changed, 17 insertions, 3 deletions
diff --git a/pygments/lexers/chapel.py b/pygments/lexers/chapel.py
index 520be37b..6fb6920c 100644
--- a/pygments/lexers/chapel.py
+++ b/pygments/lexers/chapel.py
@@ -46,9 +46,10 @@ class ChapelLexer(RegexLexer):
'continue', 'delete', 'dmapped', 'do', 'domain', 'else', 'enum',
'export', 'extern', 'for', 'forall', 'if', 'index', 'inline',
'iter', 'label', 'lambda', 'let', 'local', 'new', 'noinit', 'on',
- 'otherwise', 'pragma', 'reduce', 'return', 'scan', 'select',
- 'serial', 'single', 'sparse', 'subdomain', 'sync', 'then', 'use',
- 'when', 'where', 'while', 'with', 'yield', 'zip'), suffix=r'\b'),
+ 'otherwise', 'pragma', 'private', 'public', 'reduce', 'return',
+ 'scan', 'select', 'serial', 'single', 'sparse', 'subdomain',
+ 'sync', 'then', 'use', 'when', 'where', 'while', 'with', 'yield',
+ 'zip'), suffix=r'\b'),
Keyword),
(r'(proc)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'procname'),
(r'(class|module|record|union)(\s+)', bygroups(Keyword, Text),
diff --git a/tests/examplefiles/99_bottles_of_beer.chpl b/tests/examplefiles/99_bottles_of_beer.chpl
index 47fcaaf6..3629028d 100644
--- a/tests/examplefiles/99_bottles_of_beer.chpl
+++ b/tests/examplefiles/99_bottles_of_beer.chpl
@@ -159,3 +159,16 @@ var wideOpen = 0o777,
clique_y = 0O660,
zeroOct = 0o0,
minPosOct = 0O1;
+
+private module M3 {
+ private proc foo() {
+
+ }
+
+ private iter bar() {
+
+ }
+
+ private var x: int;
+
+} \ No newline at end of file