You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the ability to mark newly created nodes with names in the SemgrexMatcher, allowing for a compound operation which then assigns more fields to that node
thrownewSsurgeonParseException("SplitWord expected a -reln to represent the dependency to use for the new words");
55
71
}
56
72
this.relation = relation;
73
+
74
+
if (nodeNames != null) {
75
+
String[] namePieces = nodeNames.split(",");
76
+
this.nodeNames = newHashMap<>();
77
+
for (StringnamePiece : namePieces) {
78
+
String[] pieces = namePiece.split("=", 2);
79
+
if (pieces.length < 2) {
80
+
thrownewSsurgeonParseException("SplitWord got a -name parameter which did not have a number for one of the names. Should look like 0=foo,1=bar");
81
+
}
82
+
intidx = Integer.valueOf(pieces[0]);
83
+
if (idx >= this.nodeRegex.size()) {
84
+
thrownewSsurgeonParseException("SplitWord got an index in -name which was larger than the largest possible split piece, " + idx + " (this is 0-indexed)");
0 commit comments