Closed AndersHogqvist closed 1 year ago
FYI All following is valid according to the latest:
m:= 42; // comment for one line
// a single line comment can start at
// the first character position.
(* comment *)
(***************************
Nice frame comment
****************************)
/* comment in one
or more lines */
(* (* NESTING *) *)
/* /* NESTING */ */
in other words:
MULTI_LINE_COMMENT
: ('(*' | '/*') .*? ('*)' | '*/')
;
SINGLE_LINE_COMMENT
: '//' ~[\r\n]*
;
Ok, didn't know that. We're working in OpenPCS from Kollmorgen/infoteam Software that only supports what seems like the first edition of the standard.
Since I can use comment blocks for lines as well I guess it's not worth it to add this as a configurable option. I'll close the ticket.
According to the IEC standard comments shall be surrounded by '(' and ')', this extension however uses '//' for line comments. If there are companies that deviate from the standard and actually use '//', perhaps this could be added as a configuration item?