Skip to content

Commit fe011ec

Browse files
committed
Yaml: add makeTagEntryNotifyViaYpath method to the sub parser interface
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 13201a7 commit fe011ec

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

parsers/yaml.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,9 @@ static void ypathHandleToken (yamlSubparser *yaml, yaml_token_t *token, int stat
461461
if (r)
462462
{
463463
attachYamlPosition (&tag, token, false);
464-
makeTagEntry (&tag);
464+
int index = makeTagEntry (&tag);
465+
if (index != CORK_NIL && yaml->makeTagEntryNotifyViaYpath)
466+
yaml->makeTagEntryNotifyViaYpath (yaml, index);
465467
}
466468
break;
467469
}

parsers/yaml.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ struct sYamlSubparser {
3131

3232
void (* enterBlockNotify) (yamlSubparser *s, yaml_token_t *token);
3333
void (* leaveBlockNotify) (yamlSubparser *s, yaml_token_t *token);
34+
void (* makeTagEntryNotifyViaYpath) (yamlSubparser *s, int corkIndex);
3435

3536
struct sTagYpathTable *ypathTables;
3637
size_t ypathTableCount;

0 commit comments

Comments
 (0)