summaryrefslogtreecommitdiff
path: root/tests/examplefiles
diff options
context:
space:
mode:
authormppf5 <devnull@localhost>2017-09-25 15:57:19 -0400
committermppf5 <devnull@localhost>2017-09-25 15:57:19 -0400
commitb60aca2cefb7cecfebf1834b4adf52e7a33f070b (patch)
tree538708ebe76c21040cb1553931b9556d66834750 /tests/examplefiles
parent0db8e281af377923115b894703b2b8beb8f1e9d5 (diff)
downloadpygments-b60aca2cefb7cecfebf1834b4adf52e7a33f070b.tar.gz
Updating Chapel highlighter
* include new error handling keywords * fix problems with 1-character procs * include Type.method in method name * highlight iterators in addition to procs
Diffstat (limited to 'tests/examplefiles')
-rw-r--r--tests/examplefiles/99_bottles_of_beer.chpl20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/examplefiles/99_bottles_of_beer.chpl b/tests/examplefiles/99_bottles_of_beer.chpl
index cdc1e650..80d2a89e 100644
--- a/tests/examplefiles/99_bottles_of_beer.chpl
+++ b/tests/examplefiles/99_bottles_of_beer.chpl
@@ -177,3 +177,23 @@ private module M3 {
private var x: int;
}
+prototype module X {
+
+ proc f() throws {
+ throw new Error();
+ }
+
+ proc g() {
+ try {
+ f();
+ try! f();
+ } catch e {
+ writeln("Caught ", e);
+ }
+ }
+
+ proc int.add() { }
+
+ g();
+}
+