Skip to content

Commit

Permalink
Feat: Change delimiter
Browse files Browse the repository at this point in the history
  • Loading branch information
01Parzival10 committed Oct 2, 2024
1 parent e47092f commit f5be7ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit f5be7ec

Please sign in to comment.