File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ export class PortBehaviorValidator {
32
32
33
33
// Regex that validates a term
34
34
// Has the label type and label value that should be set as capturing groups.
35
- private static readonly TERM_REGEX = / ^ ( \s * | ! | T R U E | F A L S E | \| \| | & & | \( | \) | ( [ A - Z a - z 0 - 9 _ ] + \. [ A - Z a - z 0 - 9 _ ] + ) ) + $ / ;
35
+ private static readonly TERM_REGEX =
36
+ / ^ ( \s * | ! | T R U E | F A L S E | \| \| | & & | \( | \) | ( [ A - Z a - z 0 - 9 _ ] + \. [ A - Z a - z 0 - 9 _ ] + (? ! [ A - Z a - z 0 - 9 _ ] * \. [ A - Z a - z 0 - 9 _ ] * ) ) ) + $ / g;
36
37
37
38
private static readonly LABEL_REGEX = / ( [ A - Z a - z 0 - 9 _ ] + ) \. ( [ A - Z a - z 0 - 9 _ ] + ) / g;
38
39
@@ -335,6 +336,15 @@ export class PortBehaviorValidator {
335
336
idx = line . indexOf ( inputLabelValue , idx + 1 ) ;
336
337
}
337
338
}
339
+
340
+ console . log ( inputMatch ) ;
341
+
342
+ if ( inputMatch [ 3 ] !== undefined ) {
343
+ inputAccessErrors . push ( {
344
+ line : lineNumber ,
345
+ message : `invalid label definition` ,
346
+ } ) ;
347
+ }
338
348
}
339
349
340
350
const node = port . parent ;
@@ -451,6 +461,13 @@ export class PortBehaviorValidator {
451
461
}
452
462
}
453
463
}
464
+
465
+ if ( typeValuePair . split ( "." ) [ 2 ] !== undefined ) {
466
+ inputAccessErrors . push ( {
467
+ line : lineNumber ,
468
+ message : `invalid label definition` ,
469
+ } ) ;
470
+ }
454
471
}
455
472
456
473
return inputAccessErrors . length > 0 ? inputAccessErrors : [ ] ;
You can’t perform that action at this time.
0 commit comments