summaryrefslogtreecommitdiff
path: root/tests/lexers/scheme/example2.txt
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2021-01-18 21:24:00 +0100
committerGeorg Brandl <georg@python.org>2021-01-18 22:08:36 +0100
commit2a3d3a7d5b9c60dedf6638d876161d9563faebcf (patch)
tree809c0b4a686db98f5954afa1944404cd9652c6b2 /tests/lexers/scheme/example2.txt
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/scheme/example2.txt')
-rw-r--r--tests/lexers/scheme/example2.txt83
1 files changed, 83 insertions, 0 deletions
diff --git a/tests/lexers/scheme/example2.txt b/tests/lexers/scheme/example2.txt
new file mode 100644
index 00000000..c63e7061
--- /dev/null
+++ b/tests/lexers/scheme/example2.txt
@@ -0,0 +1,83 @@
+---input---
+#!r6rs
+
+#|
+
+ The FACT procedure computes the factorial
+
+ of a non-negative integer.
+
+|#
+
+(define fact
+
+ (lambda (n)
+
+ ;; base case
+
+ (if (= n 0)
+
+ #;(= n 1)
+
+ 1 ; identity of *
+
+ (* n (fact (- n 1))))))
+
+---tokens---
+'#!r6rs' Comment
+'\n\n' Text
+
+'#|' Comment.Multiline
+'\n\n The FACT procedure computes the factorial\n\n of a non-negative integer.\n\n' Comment.Multiline
+
+'|#' Comment.Multiline
+'\n\n' Text
+
+'(' Punctuation
+'define ' Keyword
+'fact' Name.Variable
+'\n\n ' Text
+'(' Punctuation
+'lambda ' Keyword
+'(' Punctuation
+'n' Name.Function
+')' Punctuation
+'\n\n ' Text
+';; base case' Comment.Single
+'\n\n ' Text
+'(' Punctuation
+'if ' Keyword
+'(' Punctuation
+'= ' Name.Builtin
+'n' Name.Variable
+' ' Text
+'0' Literal.Number.Integer
+')' Punctuation
+'\n\n ' Text
+'#;(' Comment
+'= n 1' Comment
+')' Comment
+'\n\n ' Text
+'1' Literal.Number.Integer
+' ' Text
+'; identity of *' Comment.Single
+'\n\n ' Text
+'(' Punctuation
+'* ' Name.Builtin
+'n' Name.Variable
+' ' Text
+'(' Punctuation
+'fact' Name.Function
+' ' Text
+'(' Punctuation
+'- ' Name.Builtin
+'n' Name.Variable
+' ' Text
+'1' Literal.Number.Integer
+')' Punctuation
+')' Punctuation
+')' Punctuation
+')' Punctuation
+')' Punctuation
+')' Punctuation
+'\n' Text