summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/pawn/60001-comment.p
diff options
context:
space:
mode:
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/pawn/60001-comment.p')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/pawn/60001-comment.p46
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/pawn/60001-comment.p b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/pawn/60001-comment.p
new file mode 100644
index 00000000..f63deb62
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/expected/pawn/60001-comment.p
@@ -0,0 +1,46 @@
+/* parse C comments interactively, using events and a state machine */
+main()
+{
+ state plain;
+}
+@keypressed(key) <plain>
+{
+ state (key == '/') slash;
+ if (key != '/') {
+ echo key;
+ }
+}
+@keypressed(key) <slash>
+{
+ state (key != '/') plain;
+ state (key == '*') comment;
+ echo '/'; /* print '/' held back from previous state */
+ if (key != '/') {
+ echo key;
+ }
+}
+@keypressed(key) <comment>
+{
+ echo key;
+ state (key == '*') star;
+}
+@keypressed(key) <star>
+{
+ echo key;
+ state (key != '*') comment;
+ state (key == '/') plain;
+}
+echo(key) <plain, slash>
+{
+ printchar key, yellow;
+}
+echo(key) <comment, star>
+{
+ printchar key, green;
+}
+printchar(ch, colour)
+{
+ setattr .foreground = colour;
+ printf "%c", ch;
+}
+