Skip to content

Commit 3554873

Browse files
committed
- add - highlight for PUBLIC, PRIVATE, PROTECTED keywords
1 parent 5345cf8 commit 3554873

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

example.iecst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ CONFIGURATION DefaultCfg
55
TASK NewTask (INTERVAL := T#20ms);
66
PROGRAM Main WITH NewTask : PLC_PRG;
77
END_CONFIGURATION
8-
PROGRAM demo
8+
9+
PROGRAM demo
910
VAR_EXTERNAL
1011
Start_Stop: BOOL;
1112
END_VAR
@@ -18,7 +19,11 @@ END_CONFIGURATION
1819
Start_Stop := TRUE;
1920
END_IF
2021
END_PROGRAM;
21-
/* Get a square of the circle */
22+
23+
FUNCTION_BLOCK PRIVATE MyName EXTENDS AnotherName
24+
25+
END_FUNCTION_BLOCK
26+
/* Get a square of the circle */
2227
FUNCTION csq : REAL
2328
VAR_INPUT
2429
r: REAL;

iecst.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function hljsDefineIECST(hljs) {
2222
keyword:
2323
"if then end_if elsif else case of end_case " +
2424
"to do by while repeat end_while end_repeat for end_for from " +
25+
"private public protected " +
2526
"or and not xor le ge eq ne ge lt constant return exit at retain non_retain task with until using extend",
2627
title:
2728
"program end_program function end_function function_block end_function_block configuration " +

0 commit comments

Comments
 (0)