Skip to content

Commit 43fffc1

Browse files
committed
Merge branch 'assignment' of https://github.com/DataFlowAnalysis/WebEditor into assignment
2 parents 07b249e + dc71785 commit 43fffc1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/features/dfdElements/outputPortBehaviorValidation.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ interface PortBehaviorValidationError {
2121
@injectable()
2222
export class PortBehaviorValidator {
2323
// Regex that validates assignments
24-
// Matches "Assignment({input_Pins};Term;{out_Label})"
24+
// Matches "Assignment({input_Pins};TERM_REGEX;{out_Label})"
2525
private static readonly ASSIGNMENT_REGEX =
26-
/^Assignment\(\{(([A-Za-z0-9_\|]+(,\s*[A-Za-z0-9_\|]+)*)?)\};(\s*|!|TRUE|FALSE|\|\||&&|\(|\)|([A-Za-z0-9_]*\.[A-Za-z0-9_]*))+;\{(((([A-Za-z0-9_]*)\.[A-Za-z0-9_]*)+(,\s*([A-Za-z0-9_]*\.[A-Za-z0-9_]*))*)?)\}\)+$/;
26+
/^Assignment\(\{(([A-Za-z0-9_][A-Za-z0-9_\|]+(,\s*[A-Za-z0-9_\|]+)*)?)\};(\s*|!|TRUE|FALSE|\|\||&&|\(|\)|([A-Za-z0-9_]*\.[A-Za-z0-9_]*))+;\{(((([A-Za-z0-9_]*)\.[A-Za-z0-9_]*)+(,\s*([A-Za-z0-9_]*\.[A-Za-z0-9_]*))*)?)\}\)+$/;
2727

2828
// Regex that validates forwarding
2929
// Matches "Forwarding({input_pins})"
30-
private static readonly FORWARDING_REGEX = /^Forwarding\(\{[A-Za-z0-9_\|]+(,\s*[A-Za-z0-9_\|]+)*\}\)$/;
30+
private static readonly FORWARDING_REGEX = /^Forwarding\(\{[A-Za-z0-9_][A-Za-z0-9_\|]+(,\s*[A-Za-z0-9_][A-Za-z0-9_\|]+)*\}\)$/;
3131

3232
// Regex that validates a term
3333
// Has the label type and label value that should be set as capturing groups.

0 commit comments

Comments
 (0)