fix for when the concatenation root is in parentheses

This commit is contained in:
Erik Krogh Kristensen
2019-09-26 16:35:38 +02:00
parent 69365ccd03
commit 7fb8f8453d
3 changed files with 4 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ Expr leftChild(Expr e) {
}
predicate isInConcat(Expr e) {
exists(ParExpr par | par.getExpression() = e)
exists(ParExpr par | isInConcat(par) and par.getExpression() = e)
or
exists(AddExpr a | a.getAnOperand() = e)
}

View File

@@ -11,4 +11,5 @@
| missing.js:24:5:24:21 | `missing a space` | This string appears to be missing a space after 'space'. |
| missing.js:26:5:26:21 | "missing a space" | This string appears to be missing a space after 'space'. |
| missing.js:28:5:28:21 | `missing a space` | This string appears to be missing a space after 'space'. |
| missing.js:31:7:31:12 | "h. 0" | This string appears to be missing a space after '0'. |
| missing.js:30:7:30:21 | "missing space" | This string appears to be missing a space after 'space'. |
| missing.js:32:7:32:12 | "h. 0" | This string appears to be missing a space after '0'. |

View File

@@ -27,5 +27,6 @@ s = "missing a space" +
`here`;
s = `missing a space` +
`here`;
s = (("missing space") + "here")
s = (("h. 0" + "h")) + "word"