aboutsummaryrefslogtreecommitdiff
path: root/plugin/examples/highlighting.cps
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-27 14:00:49 +0000
committer_ov4 <ov4@ov4.org>2026-10-27 14:00:49 +0000
commit5d37ebcc02f6ca2ce1ced93f803dd1daf634d866 (patch)
tree4c955f89e1f43aefe66064e34e547625eba3bc1b /plugin/examples/highlighting.cps
parent3d7d1d7cf8685f0d9230cd89d06017869da1c6d8 (diff)
feat(editor): support PP directives in VS Code and Bundle
Share preprocessor highlighting through the existing grammar, keep conditional blocks at the ordinary indentation depth, and exercise switches in Bundle's native runner test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'plugin/examples/highlighting.cps')
-rw-r--r--plugin/examples/highlighting.cps10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/examples/highlighting.cps b/plugin/examples/highlighting.cps
index 10d93d8..a7ec8c6 100644
--- a/plugin/examples/highlighting.cps
+++ b/plugin/examples/highlighting.cps
@@ -75,3 +75,13 @@ ENDCLASS
DECLARE Count : Counter
CALL Count.Add(Limit)
OUTPUT Count.Get()
+
+// Preprocessor conditions do not add indentation.
+PP_DEFINE Demo
+PP_IFDEF Demo
+OUTPUT "Enabled"
+PP_IFNDEF OtherDemo
+OUTPUT "Nested condition"
+PP_ENDIF
+PP_ENDIF
+PP_UNDEF Demo