aboutsummaryrefslogtreecommitdiff
path: root/plugin/examples
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-13 05:53:16 +0000
committer_ov4 <ov4@ov4.org>2026-10-13 05:53:16 +0000
commitbe8154fac8a0ea5eb3dddef4053f12d67102009d (patch)
treef782d438ffa451ebd2efc00ccc0b7a4579a020c4 /plugin/examples
parent38ff4e782ef844a21512eb2ca0e491387ae89ec5 (diff)
feat(plugin): add CIE language registration and C++ style highlighting
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'plugin/examples')
-rw-r--r--plugin/examples/highlighting.cps41
1 files changed, 41 insertions, 0 deletions
diff --git a/plugin/examples/highlighting.cps b/plugin/examples/highlighting.cps
new file mode 100644
index 0000000..9925bf3
--- /dev/null
+++ b/plugin/examples/highlighting.cps
@@ -0,0 +1,41 @@
+// Open in a dark theme; keywords are uppercase and comments ignore [(
+TYPE Season = (Spring, Summer, Autumn, Winter)
+TYPE IntPointer = ^INTEGER
+TYPE Student
+ DECLARE Name : STRING
+ DECLARE Initial : CHAR
+ENDTYPE
+
+DECLARE Values : ARRAY[1:3] OF INTEGER
+DECLARE Index : INTEGER
+DECLARE Total : REAL
+DECLARE Ready : BOOLEAN
+DECLARE Text : STRING
+DECLARE Letter : CHAR
+Ready <- TRUE AND NOT FALSE
+Total <- -3.5 + 2 * 4 / 2
+Text <- "CIE // [()]" & " pseudocode"
+Letter <- 'A'
+
+FOR Index <- 1 TO 3 STEP 1
+ Values[Index] <- Index MOD 2
+NEXT Index
+IF Ready OR Total >= 1 THEN
+ OUTPUT MID(Text, 1, LENGTH(Text))
+ELSE
+ OUTPUT "Try again"
+ENDIF
+
+FUNCTION Double(Value : INTEGER) RETURNS INTEGER
+ RETURN Value * 2
+ENDFUNCTION
+PROCEDURE Swap(BYREF X : INTEGER, Y : INTEGER)
+ DECLARE Temp : INTEGER
+ Temp <- X
+ X <- Y
+ Y <- Temp
+ENDPROCEDURE
+
+OPENFILE "example.txt" FOR WRITE
+WRITEFILE "example.txt", Text
+CLOSEFILE "example.txt"