Skip to content

Commit 4167bab

Browse files
authored
Feat: Change port name delimiter from _ to | (#46)
* Feat: Change port name delimiter from _ to ; * Feat: Change delimiter * Fix: outputPortBehaviorValidation.ts Regex
1 parent 718c71b commit 4167bab

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/features/dfdElements/outputPortBehaviorValidation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ export class PortBehaviorValidator {
2323
// Regex that validates a set statement.
2424
// Has the label type and label value that should be set as capturing groups.
2525
private static readonly SET_REGEX =
26-
/^set +([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*) *= *(?: +|!|TRUE|FALSE|\|\||&&|\(|\)|[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*){2})+$/;
26+
/^set +([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*) *= *(?: +|!|TRUE|FALSE|\|\||&&|\(|\)|[A-Za-z][A-Za-z0-9_\|]*(?:\.[A-Za-z][A-Za-z0-9_]*){2})+$/;
2727
// Regex that is used to extract all inputs, their label types and label values from a set statement.
2828
// Each input is a match with the input name, label type and label value as capturing groups.
2929
private static readonly SET_REGEX_EXPRESSION_INPUTS =
30-
/([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)/g;
30+
/([A-Za-z][A-Za-z0-9_\|]*)\.([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)/g;
3131
// Regex matching alphanumeric characters.
32-
public static readonly REGEX_ALPHANUMERIC = /[A-Za-z0-9_]+/;
32+
public static readonly REGEX_ALPHANUMERIC = /[A-Za-z0-9_\|]+/;
3333

3434
constructor(@inject(LabelTypeRegistry) @optional() private readonly labelTypeRegistry?: LabelTypeRegistry) {}
3535

src/features/dfdElements/outputPortEditUi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const dfdBehaviorLanguageMonarchDefinition: monaco.languages.IMonarchLanguage =
103103
root: [
104104
// keywords and identifiers
105105
[
106-
/[a-zA-Z_$][\w$]*/,
106+
/[a-zA-Z_\|$][\w$]*/,
107107
{
108108
cases: {
109109
"@keywords": "keyword",

src/features/dfdElements/ports.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class DfdInputPortImpl extends SPortImpl {
5454
if (edgeNames.length === 0) {
5555
return undefined;
5656
} else {
57-
return edgeNames.sort().join("_");
57+
return edgeNames.sort().join("|");
5858
}
5959
}
6060

0 commit comments

Comments
 (0)