Skip to content

Commit

Permalink
Fix union syntax errors in parser files.
Browse files Browse the repository at this point in the history
Missing curly braces When initializing union members in tagXpathTable structs:
 - recurSpec
 - makeTagSpec
  • Loading branch information
acarlson1029 committed Feb 20, 2016
1 parent 91c0d47 commit 5388946
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 20 deletions.
20 changes: 13 additions & 7 deletions parsers/ant.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,52 +75,58 @@ enum antXpathTable {
static tagXpathTable antXpathMainTable [] = {
{ "///project",
LXPATH_TABLE_DO_RECUR,
.recurSpec = {
{ .recurSpec= {
antFindTagsUnderProject
}
}
}
},
};

static tagXpathTable antXpathProjectTable [] = {
{ "target",
LXPATH_TABLE_DO_RECUR,
.recurSpec = {
{ .recurSpec= {
antFindTagsUnderTask
}
}
},
{ "property/@name",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_PROPERTY, ROLE_INDEX_DEFINITION,
makeTagWithScope,
}
}
},
{ "import/@file",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_IMPORT, R_IMPORT_GENERIC,
makeTagWithScope,
}
}
},
};

static tagXpathTable antXpathMainNameTable [] = {
{ "@name",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_PROJECT, ROLE_INDEX_DEFINITION,
makeTagForProjectName,
}
}
},
};

static tagXpathTable antXpathTargetNameTable [] = {
{ "@name",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_TARGET, ROLE_INDEX_DEFINITION,
makeTagForTargetName,
}
}
},
};

Expand Down
15 changes: 10 additions & 5 deletions parsers/dbusintrospect.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,44 +50,49 @@ static void makeTagWithScope (xmlNode *node,
static tagXpathTable dbusIntrospectXpathInterfaceTable [] = {
{ "//method/@name",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_METHOD, ROLE_INDEX_DEFINITION,
makeTagWithScope,
}
}
},
{ "//signal/@name",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_SIGNAL, ROLE_INDEX_DEFINITION,
makeTagWithScope,
}
}
},
{ "//property/@name",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_PROPERTY, ROLE_INDEX_DEFINITION,
makeTagWithScope
}
}
},

};

static tagXpathTable dbusIntrospectXpathMainTable [] = {
{ "///interface",
LXPATH_TABLE_DO_RECUR,
.recurSpec = {
{ .recurSpec = {
dbusIntrospectFindTagsUnderInterface
}
}
},
};

static tagXpathTable dbusIntrospectXpathMainNameTable [] = {
{ "@name",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_INTERFACE, ROLE_INDEX_DEFINITION,
makeTagForInterfaceName,
}
}
},
};

Expand Down
9 changes: 6 additions & 3 deletions parsers/glade.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,21 @@ static kindOption GladeKinds [] = {
static tagXpathTable gladeXpathMainTable[] = {
{ "///glade-interface//widget//@id",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_ID, ROLE_INDEX_DEFINITION }
}
},
{ "///glade-interface//widget//@class",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_CLASS, R_CLASS_WIDGET }
}
},
{ "///glade-interface//signal//@handler",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_HANDLER, R_HANDLER_HANDLER }
}
},
};

Expand Down
15 changes: 10 additions & 5 deletions parsers/maven2.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,37 +77,42 @@ static void makeTagForProperties (xmlNode *node,
static tagXpathTable maven2XpathMainTable[] = {
{ "/*[local-name()='project']/*[local-name()='groupId']",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_GROUP_ID, ROLE_INDEX_DEFINITION,
makeTagWithScope
}
}
},
{ "/*[local-name()='project']/*[local-name()='parent']/*[local-name()='groupId']",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_GROUP_ID, R_GROUP_ID_PARENT,
makeTagWithScope
}
}
},
{ "/*[local-name()='project']/*[local-name()='artifactId']",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_ARTIFACT_ID, ROLE_INDEX_DEFINITION,
makeTagWithScope
}
}
},
{ "/*[local-name()='project']/*[local-name()='parent']/*[local-name()='artifactId']",
LXPATH_TABLE_DO_MAKE,
.makeTagSpec = {
{ .makeTagSpec = {
K_ARTIFACT_ID, R_ARTIFACT_ID_PARENT,
makeTagWithScope
}
}
},
{ "/*[local-name()='project']/*[local-name()='properties']/*",
LXPATH_TABLE_DO_RECUR,
.recurSpec = {
{ .recurSpec = {
makeTagForProperties
}
}
},
};

Expand Down

0 comments on commit 5388946

Please sign in to comment.