Move Yang patterns: \n match from yang parse to regex compile stage
This commit is contained in:
parent
3ed41c5a04
commit
9aad253f1e
4 changed files with 10 additions and 90 deletions
|
|
@ -1896,18 +1896,6 @@ ys_parse_sub(yang_stmt *ys,
|
|||
goto done;
|
||||
}
|
||||
break;
|
||||
case Y_PATTERN:{
|
||||
char *s0;
|
||||
char *s1 = NULL;
|
||||
/* Replace \\n with \n */
|
||||
s0 = yang_argument_get(ys);
|
||||
if (nonprint_encode(s0, &s1) < 0)
|
||||
goto done;
|
||||
yang_argument_set(ys, s1);
|
||||
if (s0)
|
||||
free(s0);
|
||||
break;
|
||||
}
|
||||
case Y_UNKNOWN:{ /* save (optional) argument in ys_cv */
|
||||
if (extra == NULL)
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue