Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/features/dfdElements/outputPortBehaviorValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export class PortBehaviorValidator {
// Regex that validates a set statement.
// Has the label type and label value that should be set as capturing groups.
private static readonly SET_REGEX =
/^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})+$/;
/^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})+$/;
// Regex that is used to extract all inputs, their label types and label values from a set statement.
// Each input is a match with the input name, label type and label value as capturing groups.
private static readonly SET_REGEX_EXPRESSION_INPUTS =
/([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)/g;
/([A-Za-z][A-Za-z0-9_\|]*)\.([A-Za-z][A-Za-z0-9_]*)\.([A-Za-z][A-Za-z0-9_]*)/g;
// Regex matching alphanumeric characters.
public static readonly REGEX_ALPHANUMERIC = /[A-Za-z0-9_]+/;
public static readonly REGEX_ALPHANUMERIC = /[A-Za-z0-9_\|]+/;

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

Expand Down
2 changes: 1 addition & 1 deletion src/features/dfdElements/outputPortEditUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const dfdBehaviorLanguageMonarchDefinition: monaco.languages.IMonarchLanguage =
root: [
// keywords and identifiers
[
/[a-zA-Z_$][\w$]*/,
/[a-zA-Z_\|$][\w$]*/,
{
cases: {
"@keywords": "keyword",
Expand Down
2 changes: 1 addition & 1 deletion src/features/dfdElements/ports.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class DfdInputPortImpl extends SPortImpl {
if (edgeNames.length === 0) {
return undefined;
} else {
return edgeNames.sort().join("_");
return edgeNames.sort().join("|");
}
}

Expand Down