Merge branch 'github:main' into amammad-js-JWT

This commit is contained in:
Am
2024-06-06 15:33:26 +03:30
committed by GitHub
15585 changed files with 1445070 additions and 827541 deletions

View File

@@ -25,3 +25,24 @@ MyOtherStream.prototype.instanceProp = 1; /* def=moduleImport("classes").getMemb
MyOtherStream.classProp = 1; /* def=moduleImport("classes").getMember("exports").getMember("MyOtherStream").getMember("classProp") */
module.exports.MyOtherStream = MyOtherStream;
// function-style class without .prototype reference
function MyThirdStream() { /* use=moduleImport("classes").getMember("exports").getMember("MyThirdStream").getInstance() */
}
let instance = new MyThirdStream(); /* use=moduleImport("classes").getMember("exports").getMember("MyThirdStream").getInstance() */
module.exports.MyThirdStream = MyThirdStream;
// function-style class without .prototype reference (through global variable)
(function(f) {
foo.bar = function() { /* use=moduleImport("classes").getMember("exports").getMember("bar").getInstance() */
}
})(foo = foo || {});
(function(f) {
let x = new f.bar(); /* use=moduleImport("classes").getMember("exports").getMember("bar").getInstance() */
})(foo = foo || {});
module.exports.bar = foo.bar;

View File

@@ -0,0 +1,13 @@
import ApiGraphs.VerifyAssertions
private import semmle.javascript.dataflow.internal.PreCallGraphStep
class CustomUseStep extends PreCallGraphStep {
override predicate loadStep(DataFlow::Node pred, DataFlow::Node succ, string prop) {
exists(DataFlow::CallNode call |
call.getCalleeName() = "customLoad" and
pred = call.getArgument(0) and
succ = call and
prop = call.getArgument(1).getStringValue()
)
}
}

View File

@@ -0,0 +1,4 @@
const foo = require("foo");
foo.bar; // use=moduleImport("foo").getMember("exports").getMember("bar")
customLoad(foo, "baz") // use=moduleImport("foo").getMember("exports").getMember("baz")

View File

@@ -0,0 +1,3 @@
{
"name": "custom-use-steps"
}

View File

@@ -4,5 +4,6 @@ module.exports = {
impl,
util: require("./lib/utils"),
other: require("./lib/stuff"),
util2: require("./lib/utils2")
util2: require("./lib/utils2"),
esmodule: require("./lib/esmodule-reexport"),
};

View File

@@ -0,0 +1,2 @@
export * from "./esmodule-reexported1";
export * as lib2 from "./esmodule-reexported2";

View File

@@ -0,0 +1 @@
export function one() {} /* def=moduleImport("reexport").getMember("exports").getMember("esmodule").getMember("one") */

View File

@@ -0,0 +1 @@
export function two() {} /* def=moduleImport("reexport").getMember("exports").getMember("esmodule").getMember("lib2").getMember("two") */

View File

@@ -0,0 +1 @@
import ApiGraphs.VerifyAssertions

View File

@@ -0,0 +1,9 @@
const tag = require("tag");
tag.string`string1
${23}` // def=moduleImport("tag").getMember("exports").getMember("string").getParameter(1)
tag.highlight`string2
${23}
morestring
${42}` // def=moduleImport("tag").getMember("exports").getMember("highlight").getParameter(2)

View File

@@ -0,0 +1,3 @@
{
"name": "tagged-template"
}

View File

@@ -0,0 +1,22 @@
passingPositiveTests
| PASSED | CommandInjection | tests.js:11:46:11:70 | // test ... jection |
| PASSED | CommandInjection | tests.js:12:43:12:67 | // test ... jection |
| PASSED | CommandInjection | tests.js:13:63:13:87 | // test ... jection |
| PASSED | CommandInjection | tests.js:14:62:14:86 | // test ... jection |
| PASSED | CommandInjection | tests.js:15:60:15:84 | // test ... jection |
| PASSED | CommandInjection | tests.js:17:45:17:69 | // test ... jection |
| PASSED | CommandInjection | tests.js:18:42:18:66 | // test ... jection |
| PASSED | CommandInjection | tests.js:19:62:19:86 | // test ... jection |
| PASSED | CommandInjection | tests.js:20:63:20:87 | // test ... jection |
| PASSED | CommandInjection | tests.js:21:60:21:84 | // test ... jection |
| PASSED | CommandInjection | tests.js:23:43:23:67 | // test ... jection |
| PASSED | CommandInjection | tests.js:24:40:24:64 | // test ... jection |
| PASSED | CommandInjection | tests.js:25:40:25:64 | // test ... jection |
| PASSED | CommandInjection | tests.js:26:60:26:84 | // test ... jection |
| PASSED | CommandInjection | tests.js:28:41:28:65 | // test ... jection |
| PASSED | CommandInjection | tests.js:29:58:29:82 | // test ... jection |
| PASSED | CommandInjection | tests.js:31:51:31:75 | // test ... jection |
| PASSED | CommandInjection | tests.js:32:68:32:92 | // test ... jection |
| PASSED | CommandInjection | tests.js:34:49:34:73 | // test ... jection |
| PASSED | CommandInjection | tests.js:35:66:35:90 | // test ... jection |
failingPositiveTests

View File

@@ -0,0 +1,36 @@
import { execa, execaSync, execaCommand, execaCommandSync, $ } from 'execa';
import http from 'node:http'
import url from 'url'
http.createServer(async function (req, res) {
let cmd = url.parse(req.url, true).query["cmd"][0];
let arg1 = url.parse(req.url, true).query["arg1"];
let arg2 = url.parse(req.url, true).query["arg2"];
let arg3 = url.parse(req.url, true).query["arg3"];
await $`${cmd} ${arg1} ${arg2} ${arg3}`; // test: CommandInjection
await $`ssh ${arg1} ${arg2} ${arg3}`; // test: CommandInjection
$({ shell: false }).sync`${cmd} ${arg1} ${arg2} ${arg3}`; // test: CommandInjection
$({ shell: true }).sync`${cmd} ${arg1} ${arg2} ${arg3}`; // test: CommandInjection
$({ shell: false }).sync`ssh ${arg1} ${arg2} ${arg3}`; // test: CommandInjection
$.sync`${cmd} ${arg1} ${arg2} ${arg3}`; // test: CommandInjection
$.sync`ssh ${arg1} ${arg2} ${arg3}`; // test: CommandInjection
await $({ shell: true })`${cmd} ${arg1} ${arg2} ${arg3}` // test: CommandInjection
await $({ shell: false })`${cmd} ${arg1} ${arg2} ${arg3}` // test: CommandInjection
await $({ shell: false })`ssh ${arg1} ${arg2} ${arg3}` // test: CommandInjection
await execa(cmd, [arg1, arg2, arg3]); // test: CommandInjection
await execa(cmd, { shell: true }); // test: CommandInjection
await execa(cmd, { shell: true }); // test: CommandInjection
await execa(cmd, [arg1, arg2, arg3], { shell: true }); // test: CommandInjection
execaSync(cmd, [arg1, arg2, arg3]); // test: CommandInjection
execaSync(cmd, [arg1, arg2, arg3], { shell: true }); // test: CommandInjection
await execaCommand(cmd + arg1 + arg2 + arg3); // test: CommandInjection
await execaCommand(cmd + arg1 + arg2 + arg3, { shell: true }); // test: CommandInjection
execaCommandSync(cmd + arg1 + arg2 + arg3); // test: CommandInjection
execaCommandSync(cmd + arg1 + arg2 + arg3, { shell: true }); // test: CommandInjection
});

View File

@@ -0,0 +1,38 @@
import javascript
class InlineTest extends LineComment {
string tests;
InlineTest() { tests = this.getText().regexpCapture("\\s*test:(.*)", 1) }
string getPositiveTest() {
result = tests.trim().splitAt(",").trim() and not result.matches("!%")
}
predicate hasPositiveTest(string test) { test = this.getPositiveTest() }
predicate inNode(DataFlow::Node n) {
this.getLocation().getFile() = n.getFile() and
this.getLocation().getStartLine() = n.getStartLine()
}
}
import experimental.semmle.javascript.Execa
query predicate passingPositiveTests(string res, string expectation, InlineTest t) {
res = "PASSED" and
t.hasPositiveTest(expectation) and
expectation = "CommandInjection" and
exists(SystemCommandExecution n |
t.inNode(n.getArgumentList()) or t.inNode(n.getACommandArgument())
)
}
query predicate failingPositiveTests(string res, string expectation, InlineTest t) {
res = "FAILED" and
t.hasPositiveTest(expectation) and
expectation = "CommandInjection" and
not exists(SystemCommandExecution n |
t.inNode(n.getArgumentList()) or t.inNode(n.getACommandArgument())
)
}

View File

@@ -0,0 +1,6 @@
passingPositiveTests
| PASSED | PathInjection | tests.js:9:43:9:64 | // test ... jection |
| PASSED | PathInjection | tests.js:12:50:12:71 | // test ... jection |
| PASSED | PathInjection | tests.js:15:61:15:82 | // test ... jection |
| PASSED | PathInjection | tests.js:18:73:18:94 | // test ... jection |
failingPositiveTests

View File

@@ -0,0 +1,19 @@
import { execa, $ } from 'execa';
import http from 'node:http'
import url from 'url'
http.createServer(async function (req, res) {
let filePath = url.parse(req.url, true).query["filePath"][0];
// Piping to stdin from a file
await $({ inputFile: filePath })`cat` // test: PathInjection
// Piping to stdin from a file
await execa('cat', { inputFile: filePath }); // test: PathInjection
// Piping Stdout to file
await execa('echo', ['example3']).pipeStdout(filePath); // test: PathInjection
// Piping all of command output to file
await execa('echo', ['example4'], { all: true }).pipeAll(filePath); // test: PathInjection
});

View File

@@ -0,0 +1,34 @@
import javascript
class InlineTest extends LineComment {
string tests;
InlineTest() { tests = this.getText().regexpCapture("\\s*test:(.*)", 1) }
string getPositiveTest() {
result = tests.trim().splitAt(",").trim() and not result.matches("!%")
}
predicate hasPositiveTest(string test) { test = this.getPositiveTest() }
predicate inNode(DataFlow::Node n) {
this.getLocation().getFile() = n.getFile() and
this.getLocation().getStartLine() = n.getStartLine()
}
}
import experimental.semmle.javascript.Execa
query predicate passingPositiveTests(string res, string expectation, InlineTest t) {
res = "PASSED" and
t.hasPositiveTest(expectation) and
expectation = "PathInjection" and
exists(FileSystemReadAccess n | t.inNode(n.getAPathArgument()))
}
query predicate failingPositiveTests(string res, string expectation, InlineTest t) {
res = "FAILED" and
t.hasPositiveTest(expectation) and
expectation = "PathInjection" and
not exists(FileSystemReadAccess n | t.inNode(n.getAPathArgument()))
}

View File

@@ -0,0 +1,234 @@
nodes
| busybus.js:9:30:9:33 | file |
| busybus.js:9:30:9:33 | file |
| busybus.js:9:36:9:39 | info |
| busybus.js:9:36:9:39 | info |
| busybus.js:10:19:10:50 | { filen ... eType } |
| busybus.js:10:19:10:57 | encoding |
| busybus.js:10:19:10:57 | filename |
| busybus.js:10:19:10:57 | mimeType |
| busybus.js:10:21:10:28 | filename |
| busybus.js:10:31:10:38 | encoding |
| busybus.js:10:41:10:48 | mimeType |
| busybus.js:10:54:10:57 | info |
| busybus.js:12:18:12:25 | filename |
| busybus.js:12:18:12:25 | filename |
| busybus.js:12:28:12:35 | encoding |
| busybus.js:12:28:12:35 | encoding |
| busybus.js:12:38:12:45 | mimeType |
| busybus.js:12:38:12:45 | mimeType |
| busybus.js:13:23:13:23 | z |
| busybus.js:13:31:13:36 | sink() |
| busybus.js:13:31:13:36 | sink() |
| busybus.js:15:30:15:33 | data |
| busybus.js:15:30:15:33 | data |
| busybus.js:16:22:16:25 | data |
| busybus.js:16:22:16:25 | data |
| busybus.js:22:25:22:42 | data |
| busybus.js:22:32:22:42 | this.read() |
| busybus.js:22:32:22:42 | this.read() |
| busybus.js:23:26:23:29 | data |
| busybus.js:23:26:23:29 | data |
| busybus.js:27:25:27:28 | name |
| busybus.js:27:25:27:28 | name |
| busybus.js:27:31:27:33 | val |
| busybus.js:27:31:27:33 | val |
| busybus.js:27:36:27:39 | info |
| busybus.js:27:36:27:39 | info |
| busybus.js:28:18:28:21 | name |
| busybus.js:28:18:28:21 | name |
| busybus.js:28:24:28:26 | val |
| busybus.js:28:24:28:26 | val |
| busybus.js:28:29:28:32 | info |
| busybus.js:28:29:28:32 | info |
| dicer.js:12:23:12:26 | part |
| dicer.js:12:23:12:26 | part |
| dicer.js:13:19:13:24 | sink() |
| dicer.js:13:19:13:24 | sink() |
| dicer.js:14:28:14:33 | header |
| dicer.js:14:28:14:33 | header |
| dicer.js:16:22:16:27 | header |
| dicer.js:16:22:16:30 | header[h] |
| dicer.js:16:22:16:30 | header[h] |
| dicer.js:19:26:19:29 | data |
| dicer.js:19:26:19:29 | data |
| dicer.js:20:18:20:21 | data |
| dicer.js:20:18:20:21 | data |
| formidable.js:7:11:7:25 | [fields, files] |
| formidable.js:7:11:7:49 | fields |
| formidable.js:7:11:7:49 | files |
| formidable.js:7:12:7:17 | fields |
| formidable.js:7:20:7:24 | files |
| formidable.js:7:29:7:49 | await f ... se(req) |
| formidable.js:7:35:7:49 | form.parse(req) |
| formidable.js:7:35:7:49 | form.parse(req) |
| formidable.js:8:10:8:15 | fields |
| formidable.js:8:10:8:15 | fields |
| formidable.js:8:18:8:22 | files |
| formidable.js:8:18:8:22 | files |
| formidable.js:9:27:9:34 | formname |
| formidable.js:9:27:9:34 | formname |
| formidable.js:9:37:9:40 | file |
| formidable.js:9:37:9:40 | file |
| formidable.js:10:14:10:21 | formname |
| formidable.js:10:14:10:21 | formname |
| formidable.js:10:24:10:27 | file |
| formidable.js:10:24:10:27 | file |
| formidable.js:12:22:12:29 | formname |
| formidable.js:12:22:12:29 | formname |
| formidable.js:12:32:12:35 | file |
| formidable.js:12:32:12:35 | file |
| formidable.js:13:14:13:21 | formname |
| formidable.js:13:14:13:21 | formname |
| formidable.js:13:24:13:27 | file |
| formidable.js:13:24:13:27 | file |
| formidable.js:15:23:15:31 | fieldName |
| formidable.js:15:23:15:31 | fieldName |
| formidable.js:15:34:15:43 | fieldValue |
| formidable.js:15:34:15:43 | fieldValue |
| formidable.js:16:14:16:22 | fieldName |
| formidable.js:16:14:16:22 | fieldName |
| formidable.js:16:25:16:34 | fieldValue |
| formidable.js:16:25:16:34 | fieldValue |
| multiparty.js:8:22:8:25 | part |
| multiparty.js:8:22:8:25 | part |
| multiparty.js:9:14:9:17 | part |
| multiparty.js:9:14:9:17 | part |
| multiparty.js:10:19:10:24 | sink() |
| multiparty.js:10:19:10:24 | sink() |
| multiparty.js:14:37:14:42 | fields |
| multiparty.js:14:37:14:42 | fields |
| multiparty.js:14:45:14:49 | files |
| multiparty.js:14:45:14:49 | files |
| multiparty.js:15:14:15:19 | fields |
| multiparty.js:15:14:15:19 | fields |
| multiparty.js:15:22:15:26 | files |
| multiparty.js:15:22:15:26 | files |
edges
| busybus.js:9:30:9:33 | file | busybus.js:13:23:13:23 | z |
| busybus.js:9:30:9:33 | file | busybus.js:13:23:13:23 | z |
| busybus.js:9:36:9:39 | info | busybus.js:10:54:10:57 | info |
| busybus.js:9:36:9:39 | info | busybus.js:10:54:10:57 | info |
| busybus.js:10:19:10:50 | { filen ... eType } | busybus.js:10:21:10:28 | filename |
| busybus.js:10:19:10:50 | { filen ... eType } | busybus.js:10:31:10:38 | encoding |
| busybus.js:10:19:10:50 | { filen ... eType } | busybus.js:10:41:10:48 | mimeType |
| busybus.js:10:19:10:57 | encoding | busybus.js:12:28:12:35 | encoding |
| busybus.js:10:19:10:57 | encoding | busybus.js:12:28:12:35 | encoding |
| busybus.js:10:19:10:57 | filename | busybus.js:12:18:12:25 | filename |
| busybus.js:10:19:10:57 | filename | busybus.js:12:18:12:25 | filename |
| busybus.js:10:19:10:57 | mimeType | busybus.js:12:38:12:45 | mimeType |
| busybus.js:10:19:10:57 | mimeType | busybus.js:12:38:12:45 | mimeType |
| busybus.js:10:21:10:28 | filename | busybus.js:10:19:10:57 | filename |
| busybus.js:10:31:10:38 | encoding | busybus.js:10:19:10:57 | encoding |
| busybus.js:10:41:10:48 | mimeType | busybus.js:10:19:10:57 | mimeType |
| busybus.js:10:54:10:57 | info | busybus.js:10:19:10:50 | { filen ... eType } |
| busybus.js:13:23:13:23 | z | busybus.js:13:31:13:36 | sink() |
| busybus.js:13:23:13:23 | z | busybus.js:13:31:13:36 | sink() |
| busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data |
| busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data |
| busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data |
| busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data |
| busybus.js:22:25:22:42 | data | busybus.js:23:26:23:29 | data |
| busybus.js:22:25:22:42 | data | busybus.js:23:26:23:29 | data |
| busybus.js:22:32:22:42 | this.read() | busybus.js:22:25:22:42 | data |
| busybus.js:22:32:22:42 | this.read() | busybus.js:22:25:22:42 | data |
| busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name |
| busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name |
| busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name |
| busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name |
| busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val |
| busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val |
| busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val |
| busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val |
| busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info |
| busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info |
| busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info |
| busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info |
| dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() |
| dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() |
| dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() |
| dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() |
| dicer.js:14:28:14:33 | header | dicer.js:16:22:16:27 | header |
| dicer.js:14:28:14:33 | header | dicer.js:16:22:16:27 | header |
| dicer.js:16:22:16:27 | header | dicer.js:16:22:16:30 | header[h] |
| dicer.js:16:22:16:27 | header | dicer.js:16:22:16:30 | header[h] |
| dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data |
| dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data |
| dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data |
| dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data |
| formidable.js:7:11:7:25 | [fields, files] | formidable.js:7:12:7:17 | fields |
| formidable.js:7:11:7:25 | [fields, files] | formidable.js:7:20:7:24 | files |
| formidable.js:7:11:7:49 | fields | formidable.js:8:10:8:15 | fields |
| formidable.js:7:11:7:49 | fields | formidable.js:8:10:8:15 | fields |
| formidable.js:7:11:7:49 | files | formidable.js:8:18:8:22 | files |
| formidable.js:7:11:7:49 | files | formidable.js:8:18:8:22 | files |
| formidable.js:7:12:7:17 | fields | formidable.js:7:11:7:49 | fields |
| formidable.js:7:20:7:24 | files | formidable.js:7:11:7:49 | files |
| formidable.js:7:29:7:49 | await f ... se(req) | formidable.js:7:11:7:25 | [fields, files] |
| formidable.js:7:35:7:49 | form.parse(req) | formidable.js:7:29:7:49 | await f ... se(req) |
| formidable.js:7:35:7:49 | form.parse(req) | formidable.js:7:29:7:49 | await f ... se(req) |
| formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname |
| formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname |
| formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname |
| formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname |
| formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file |
| formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file |
| formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file |
| formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file |
| formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname |
| formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname |
| formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname |
| formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname |
| formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file |
| formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file |
| formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file |
| formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file |
| formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName |
| formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName |
| formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName |
| formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName |
| formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue |
| formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue |
| formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue |
| formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue |
| multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part |
| multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part |
| multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part |
| multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part |
| multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() |
| multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() |
| multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() |
| multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() |
| multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields |
| multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields |
| multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields |
| multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields |
| multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files |
| multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files |
| multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files |
| multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files |
#select
| busybus.js:12:18:12:25 | filename | busybus.js:9:36:9:39 | info | busybus.js:12:18:12:25 | filename | This entity depends on a $@. | busybus.js:9:36:9:39 | info | user-provided value |
| busybus.js:12:28:12:35 | encoding | busybus.js:9:36:9:39 | info | busybus.js:12:28:12:35 | encoding | This entity depends on a $@. | busybus.js:9:36:9:39 | info | user-provided value |
| busybus.js:12:38:12:45 | mimeType | busybus.js:9:36:9:39 | info | busybus.js:12:38:12:45 | mimeType | This entity depends on a $@. | busybus.js:9:36:9:39 | info | user-provided value |
| busybus.js:13:31:13:36 | sink() | busybus.js:9:30:9:33 | file | busybus.js:13:31:13:36 | sink() | This entity depends on a $@. | busybus.js:9:30:9:33 | file | user-provided value |
| busybus.js:16:22:16:25 | data | busybus.js:15:30:15:33 | data | busybus.js:16:22:16:25 | data | This entity depends on a $@. | busybus.js:15:30:15:33 | data | user-provided value |
| busybus.js:23:26:23:29 | data | busybus.js:22:32:22:42 | this.read() | busybus.js:23:26:23:29 | data | This entity depends on a $@. | busybus.js:22:32:22:42 | this.read() | user-provided value |
| busybus.js:28:18:28:21 | name | busybus.js:27:25:27:28 | name | busybus.js:28:18:28:21 | name | This entity depends on a $@. | busybus.js:27:25:27:28 | name | user-provided value |
| busybus.js:28:24:28:26 | val | busybus.js:27:31:27:33 | val | busybus.js:28:24:28:26 | val | This entity depends on a $@. | busybus.js:27:31:27:33 | val | user-provided value |
| busybus.js:28:29:28:32 | info | busybus.js:27:36:27:39 | info | busybus.js:28:29:28:32 | info | This entity depends on a $@. | busybus.js:27:36:27:39 | info | user-provided value |
| dicer.js:13:19:13:24 | sink() | dicer.js:12:23:12:26 | part | dicer.js:13:19:13:24 | sink() | This entity depends on a $@. | dicer.js:12:23:12:26 | part | user-provided value |
| dicer.js:16:22:16:30 | header[h] | dicer.js:14:28:14:33 | header | dicer.js:16:22:16:30 | header[h] | This entity depends on a $@. | dicer.js:14:28:14:33 | header | user-provided value |
| dicer.js:20:18:20:21 | data | dicer.js:19:26:19:29 | data | dicer.js:20:18:20:21 | data | This entity depends on a $@. | dicer.js:19:26:19:29 | data | user-provided value |
| formidable.js:8:10:8:15 | fields | formidable.js:7:35:7:49 | form.parse(req) | formidable.js:8:10:8:15 | fields | This entity depends on a $@. | formidable.js:7:35:7:49 | form.parse(req) | user-provided value |
| formidable.js:8:18:8:22 | files | formidable.js:7:35:7:49 | form.parse(req) | formidable.js:8:18:8:22 | files | This entity depends on a $@. | formidable.js:7:35:7:49 | form.parse(req) | user-provided value |
| formidable.js:10:14:10:21 | formname | formidable.js:9:27:9:34 | formname | formidable.js:10:14:10:21 | formname | This entity depends on a $@. | formidable.js:9:27:9:34 | formname | user-provided value |
| formidable.js:10:24:10:27 | file | formidable.js:9:37:9:40 | file | formidable.js:10:24:10:27 | file | This entity depends on a $@. | formidable.js:9:37:9:40 | file | user-provided value |
| formidable.js:13:14:13:21 | formname | formidable.js:12:22:12:29 | formname | formidable.js:13:14:13:21 | formname | This entity depends on a $@. | formidable.js:12:22:12:29 | formname | user-provided value |
| formidable.js:13:24:13:27 | file | formidable.js:12:32:12:35 | file | formidable.js:13:24:13:27 | file | This entity depends on a $@. | formidable.js:12:32:12:35 | file | user-provided value |
| formidable.js:16:14:16:22 | fieldName | formidable.js:15:23:15:31 | fieldName | formidable.js:16:14:16:22 | fieldName | This entity depends on a $@. | formidable.js:15:23:15:31 | fieldName | user-provided value |
| formidable.js:16:25:16:34 | fieldValue | formidable.js:15:34:15:43 | fieldValue | formidable.js:16:25:16:34 | fieldValue | This entity depends on a $@. | formidable.js:15:34:15:43 | fieldValue | user-provided value |
| multiparty.js:9:14:9:17 | part | multiparty.js:8:22:8:25 | part | multiparty.js:9:14:9:17 | part | This entity depends on a $@. | multiparty.js:8:22:8:25 | part | user-provided value |
| multiparty.js:10:19:10:24 | sink() | multiparty.js:8:22:8:25 | part | multiparty.js:10:19:10:24 | sink() | This entity depends on a $@. | multiparty.js:8:22:8:25 | part | user-provided value |
| multiparty.js:15:14:15:19 | fields | multiparty.js:14:37:14:42 | fields | multiparty.js:15:14:15:19 | fields | This entity depends on a $@. | multiparty.js:14:37:14:42 | fields | user-provided value |
| multiparty.js:15:22:15:26 | files | multiparty.js:14:45:14:49 | files | multiparty.js:15:22:15:26 | files | This entity depends on a $@. | multiparty.js:14:45:14:49 | files | user-provided value |

View File

@@ -0,0 +1,34 @@
/**
* @name Remote Form Flow Sources
* @description Using remote user controlled sources from Forms
* @kind path-problem
* @problem.severity error
* @security-severity 5
* @precision high
* @id js/remote-flow-source
* @tags correctness
* security
*/
import javascript
import DataFlow::PathGraph
import experimental.semmle.javascript.FormParsers
/**
* A taint-tracking configuration for test
*/
class Configuration extends TaintTracking::Configuration {
Configuration() { this = "RemoteFlowSourcesOUserForm" }
override predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
override predicate isSink(DataFlow::Node sink) {
sink = API::moduleImport("sink").getAParameter().asSink() or
sink = API::moduleImport("sink").getReturn().asSource()
}
}
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
where cfg.hasFlowPath(source, sink)
select sink.getNode(), source, sink, "This entity depends on a $@.", source.getNode(),
"user-provided value"

View File

@@ -0,0 +1,33 @@
const http = require('http');
const zlib = require('node:zlib');
const busboy = require('busboy');
const sink = require('sink');
http.createServer((req, res) => {
if (req.method === 'POST') {
const bb = busboy({ headers: req.headers });
bb.on('file', (name, file, info) => {
const { filename, encoding, mimeType } = info;
const z = zlib.createGzip();
sink(filename, encoding, mimeType) // sink
file.pipe(z).pipe(sink())
file.on('data', (data) => {
sink(data)
})
file.on('readable', function () {
// There is some data to read now.
let data;
while ((data = this.read()) !== null) {
sink(data)
}
});
});
bb.on('field', (name, val, info) => {
sink(name, val, info)
});
}
}).listen(8000, () => {
console.log('Listening for requests');
});

View File

@@ -0,0 +1,25 @@
const { inspect } = require('util');
const http = require('http');
const Dicer = require('dicer');
const sink = require('sink');
const PORT = 8080;
http.createServer((req, res) => {
let m;
const dicer = new Dicer({ boundary: m[1] || m[2] });
dicer.on('part', (part) => {
part.pipe(sink())
part.on('header', (header) => {
for (h in header) {
sink(header[h])
}
});
part.on('data', (data) => {
sink(data)
});
});
}).listen(PORT, () => {
console.log(`Listening for requests on port ${PORT}`);
});

View File

@@ -0,0 +1,22 @@
import http from 'node:http';
import formidable from 'formidable';
const sink = require('sink');
const server = http.createServer(async (req, res) => {
const form = formidable({});
const [fields, files] = await form.parse(req);
sink(fields, files)
form.on('fileBegin', (formname, file) => {
sink(formname, file)
});
form.on('file', (formname, file) => {
sink(formname, file)
});
form.on('field', (fieldName, fieldValue) => {
sink(fieldName, fieldValue)
});
});
server.listen(8080, () => {
console.log('Server listening on http://localhost:8080/ ...');
});

View File

@@ -0,0 +1,19 @@
var multiparty = require('multiparty');
var http = require('http');
var util = require('util');
const sink = require('sink');
http.createServer(function (req, res) {
var form = new multiparty.Form();
form.on('part', (part) => {
sink(part)
part.pipe(sink())
});
var form2 = new multiparty.Form();
form2.parse(req, function (err, fields, files) {
sink(fields, files)
});
form2.parse(req);
}).listen(8080);

View File

@@ -0,0 +1,220 @@
import {
BaseEntity, Brackets, DataSource, JoinColumn, NotBrackets
, OneToOne, Entity, PrimaryGeneratedColumn, Column, SelectQueryBuilder, InsertQueryBuilder
} from "typeorm";
@Entity()
export class UserActiveRecord extends BaseEntity {
@PrimaryGeneratedColumn()
id: number
@Column()
firstName: string
@Column()
lastName: string
@Column()
age: number
static findByName(firstName: string, lastName: string) {
return this.createQueryBuilder("user")
.where("user.firstName = " + firstName) // test: SQLInjectionPoint
.andWhere("user.lastName = " + lastName) // test: SQLInjectionPoint
.getMany()
}
}
@Entity()
export class Profile {
@PrimaryGeneratedColumn()
id: number
@Column()
gender: string
@Column()
photo: string
}
@Entity()
export class User {
@PrimaryGeneratedColumn()
id: number
@Column()
name: string
@OneToOne(() => Profile)
@JoinColumn()
profile: Profile
}
@Entity()
export class User2 {
@PrimaryGeneratedColumn()
id: number
@Column()
firstName: string
@Column()
lastName: string
@Column()
age: number
}
export const AppDataSource = new DataSource({
type: "sqlite",
database: "database.sqlite",
synchronize: true,
logging: false,
entities: [User, User2, Profile, UserActiveRecord],
migrations: [],
subscribers: [],
})
function makePaginationQuery<T>(q: SelectQueryBuilder<T>): SelectQueryBuilder<T> {
return q;
}
AppDataSource.initialize().then(async () => {
const BadInput = "A user controllable Remote Source like `' 1=1 --` "
// Active record
await UserActiveRecord.findByName(BadInput, "Saw")
// data mapper
const selectQueryBuilder = makePaginationQuery<User>(AppDataSource
.createQueryBuilder(User, "User").select());
selectQueryBuilder.where(BadInput).getMany().then(result => { // test: SQLInjectionPoint
console.log(result)
});
const selectQueryBuilder2 = makePaginationQuery<User>(AppDataSource
.createQueryBuilder(User, "User"));
selectQueryBuilder2.where(BadInput).getMany().then(result => { // test: SQLInjectionPoint
console.log(result)
});
const insertQueryBuilder: InsertQueryBuilder<User2> = AppDataSource
.createQueryBuilder(User2, "User2").insert();
insertQueryBuilder.into(User2)
.values({
firstName: "Timber",
lastName: () => BadInput, // test: SQLInjectionPoint
age: 33,
}).execute().then(result => {
console.log(result)
})
AppDataSource
.createQueryBuilder(User2, "User")
.insert()
.into(User2)
.values({
firstName: "Timber",
lastName: () => BadInput, // test: SQLInjectionPoint
age: 33,
})
.orUpdate(
[BadInput, BadInput], // test: SQLInjectionPoint
[BadInput], // test: SQLInjectionPoint
)
.getQueryAndParameters()
await AppDataSource.getRepository(User2).createQueryBuilder("user2")
.update(User2)
.set({ firstName: () => BadInput, lastName: "Saw2", age: 12 }) // test: SQLInjectionPoint
.where(BadInput,) // test: SQLInjectionPoint
.execute()
await AppDataSource.getRepository(User2).createQueryBuilder('user2')
.delete()
.from(User2)
.where(BadInput) // test: SQLInjectionPoint
.execute()
const queryRunner = AppDataSource.createQueryRunner()
await queryRunner.query(BadInput) // test: SQLInjectionPoint
await queryRunner.manager
.createQueryBuilder(User2, "User")
.select(BadInput) // test: SQLInjectionPoint
.where(BadInput).execute() // test: SQLInjectionPoint
await AppDataSource
.createQueryBuilder(User, "User")
.innerJoin("User.profile", "profile", BadInput, { // test: SQLInjectionPoint
id: 2,
}).getMany().then(res => console.log(res))
await AppDataSource
.createQueryBuilder(User, "User")
.leftJoinAndMapOne("User.profile", "profile", "profile", BadInput, { // test: SQLInjectionPoint
id: 2,
}).getMany().then(res => console.log(res))
await AppDataSource
.createQueryBuilder(User2, "User2")
.where((qb) => {
const subQuery = qb
.subQuery()
.select(BadInput) // test: SQLInjectionPoint
.from(User2, "user2")
.where(BadInput) // test: SQLInjectionPoint
.getQuery()
return "User2.id IN " + subQuery
})
.setParameter("registered", true)
.getMany()
// Using repository
await AppDataSource.getRepository(User2).createQueryBuilder("User2").where("User2.id =:kind" + BadInput, { kind: 1 }).getMany()
// Using DataSource
await AppDataSource
.createQueryBuilder()
.select(BadInput) // test: SQLInjectionPoint
.from(User2, "User2")
.where(BadInput, { id: 1 }) // test: SQLInjectionPoint
.getMany()
// Using entity manager
await AppDataSource.manager
.createQueryBuilder(User2, "User2").where("User2.id =:kind" + BadInput, { kind: '1' }).getMany() // test: SQLInjectionPoint
await AppDataSource
.createQueryBuilder(User2, "User2")
.leftJoinAndSelect("user.photos", "photo", BadInput).getMany() // test: SQLInjectionPoint
await AppDataSource
.createQueryBuilder(User2, "User2").groupBy("User2.id").having(BadInput).getMany() // test: SQLInjectionPoint
// orderBy
// it is a little bit restrictive, e.g. sqlite don't support it at all
await AppDataSource
.createQueryBuilder(User2, "User2").where(BadInput, { // test: SQLInjectionPoint
firstName: "Timber",
})
.where(
new Brackets((qb) => {
qb.where(BadInput).orWhere(BadInput); // test: SQLInjectionPoint
})
)
.orderBy(BadInput).orWhere(BadInput).getMany() // test: SQLInjectionPoint
// relation
AppDataSource.createQueryBuilder().relation(User, "name")
.of(User)
.select().where(BadInput).getMany().then(results => { // test: SQLInjectionPoint
console.log(results)
})
// Brackets
await AppDataSource.createQueryBuilder(User2, "User2")
.where(BadInput) // test: SQLInjectionPoint
.andWhere(
new Brackets((qb) => {
qb.where(BadInput).orWhere(BadInput); // test: SQLInjectionPoint
})
).andWhere(
new NotBrackets((qb) => {
qb.where(BadInput).orWhere(BadInput) // test: SQLInjectionPoint
}),
).getMany()
}).catch(error => console.log(error))

View File

@@ -0,0 +1,32 @@
passingPositiveTests
| PASSED | SQLInjectionPoint | test.ts:19:54:19:79 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:20:55:20:80 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:82:70:82:95 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:88:70:88:95 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:97:41:97:66 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:111:41:111:66 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:115:37:115:62 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:116:27:116:52 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:122:74:122:99 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:123:29:123:54 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:129:28:129:53 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:134:41:134:66 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:138:29:138:54 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:139:38:139:63 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:143:61:143:86 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:149:80:149:105 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:159:37:159:62 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:161:36:161:61 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:175:29:175:54 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:177:39:177:64 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:182:108:182:133 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:185:74:185:99 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:187:94:187:119 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:191:65:191:90 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:196:57:196:82 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:199:58:199:83 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:204:65:204:90 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:210:28:210:53 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:213:56:213:81 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:217:56:217:81 | // test ... onPoint |
failingPositiveTests

View File

@@ -0,0 +1,34 @@
import javascript
class InlineTest extends LineComment {
string tests;
InlineTest() { tests = this.getText().regexpCapture("\\s*test:(.*)", 1) }
string getPositiveTest() {
result = tests.trim().splitAt(",").trim() and not result.matches("!%")
}
predicate hasPositiveTest(string test) { test = this.getPositiveTest() }
predicate inNode(DataFlow::Node n) {
this.getLocation().getFile() = n.getFile() and
this.getLocation().getStartLine() = n.getStartLine()
}
}
import experimental.semmle.javascript.SQL
query predicate passingPositiveTests(string res, string expectation, InlineTest t) {
res = "PASSED" and
t.hasPositiveTest(expectation) and
expectation = "SQLInjectionPoint" and
exists(SQL::SqlString n | t.inNode(n))
}
query predicate failingPositiveTests(string res, string expectation, InlineTest t) {
res = "FAILED" and
t.hasPositiveTest(expectation) and
expectation = "SQLInjectionPoint" and
not exists(SQL::SqlString n | t.inNode(n))
}

View File

@@ -0,0 +1,15 @@
{
"compilerOptions": {
"lib": [
"es5",
"es6"
],
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "./build",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true
}
}

View File

@@ -0,0 +1,3 @@
test.amd.range(function() {
return { foo: 42 };
});

View File

@@ -4,6 +4,7 @@ amoModule_exports
| lib/a.js:1:1:3:3 | <toplevel> | foo | lib/a.js:2:19:2:20 | 42 |
| lib/foo.js:1:1:4:0 | <toplevel> | foo | lib/foo.js:2:10:2:11 | 23 |
| lib/nested/a.js:1:1:3:3 | <toplevel> | foo | lib/nested/a.js:2:19:2:20 | 42 |
| test_range.js:1:1:4:0 | <toplevel> | foo | test_range.js:2:19:2:20 | 42 |
| tst2.js:1:1:3:3 | <toplevel> | foo | tst2.js:2:19:2:20 | 42 |
| tst3.js:1:1:3:3 | <toplevel> | foo | tst3.js:2:43:2:44 | 42 |
| tst4.js:1:1:11:3 | <toplevel> | bar | tst4.js:9:14:9:18 | b.bar |
@@ -22,6 +23,7 @@ amdModule
| lib/a.js:1:1:3:3 | <toplevel> | lib/a.js:1:1:3:2 | define( ... 2 };\\n}) |
| lib/foo.js:1:1:4:0 | <toplevel> | lib/foo.js:1:1:3:2 | define( ... : 23\\n}) |
| lib/nested/a.js:1:1:3:3 | <toplevel> | lib/nested/a.js:1:1:3:2 | define( ... 2 };\\n}) |
| test_range.js:1:1:4:0 | <toplevel> | test_range.js:1:1:3:2 | test.am ... 2 };\\n}) |
| tst2.js:1:1:3:3 | <toplevel> | tst2.js:1:1:3:2 | define( ... 42;\\n}) |
| tst3.js:1:1:3:3 | <toplevel> | tst3.js:1:1:3:2 | define( ... 42;\\n}) |
| tst4.js:1:1:11:3 | <toplevel> | tst4.js:1:1:11:2 | define( ... };\\n}) |
@@ -48,6 +50,7 @@ amdModuleDefinition
| lib/a.js:1:1:3:2 | define( ... 2 };\\n}) | lib/a.js:1:8:3:1 | functio ... 42 };\\n} |
| lib/foo.js:1:1:3:2 | define( ... : 23\\n}) | lib/foo.js:1:8:3:1 | {\\n foo: 23\\n} |
| lib/nested/a.js:1:1:3:2 | define( ... 2 };\\n}) | lib/nested/a.js:1:8:3:1 | functio ... 42 };\\n} |
| test_range.js:1:1:3:2 | test.am ... 2 };\\n}) | test_range.js:1:16:3:1 | functio ... 42 };\\n} |
| tst2.js:1:1:3:2 | define( ... 42;\\n}) | tst2.js:1:21:3:1 | functio ... = 42;\\n} |
| tst3.js:1:1:3:2 | define( ... 42;\\n}) | tst3.js:1:8:3:1 | functio ... = 42;\\n} |
| tst4.js:1:1:11:2 | define( ... };\\n}) | tst4.js:6:11:11:1 | functio ... };\\n} |
@@ -58,7 +61,6 @@ amdModuleDefinition
| umd.js:4:9:4:43 | define( ... actory) | umd.js:1:18:1:24 | factory |
| umd.js:4:9:4:43 | define( ... actory) | umd.js:9:9:14:1 | functio ... };\\n} |
amdModuleDependencies
| tst2.js:1:1:3:2 | define( ... 42;\\n}) | tst2.js:1:9:1:17 | 'exports' |
| tst3.js:1:1:3:2 | define( ... 42;\\n}) | tst3.js:2:21:2:25 | './a' |
| tst4.js:1:1:11:2 | define( ... };\\n}) | tst4.js:2:9:2:14 | 'a.js' |
| tst4.js:1:1:11:2 | define( ... };\\n}) | tst4.js:3:9:3:13 | 'foo' |
@@ -78,6 +80,7 @@ amdModuleExportedSymbol
| lib/a.js:1:1:3:3 | <toplevel> | foo |
| lib/foo.js:1:1:4:0 | <toplevel> | foo |
| lib/nested/a.js:1:1:3:3 | <toplevel> | foo |
| test_range.js:1:1:4:0 | <toplevel> | foo |
| tst2.js:1:1:3:3 | <toplevel> | foo |
| tst3.js:1:1:3:3 | <toplevel> | foo |
| tst4.js:1:1:11:3 | <toplevel> | bar |
@@ -96,6 +99,7 @@ amdModuleExpr
| lib/a.js:1:1:3:2 | define( ... 2 };\\n}) | lib/a.js:2:12:2:22 | { foo: 42 } | lib/a.js:2:12:2:22 | { foo: 42 } |
| lib/foo.js:1:1:3:2 | define( ... : 23\\n}) | lib/foo.js:1:8:3:1 | {\\n foo: 23\\n} | lib/foo.js:1:8:3:1 | {\\n foo: 23\\n} |
| lib/nested/a.js:1:1:3:2 | define( ... 2 };\\n}) | lib/nested/a.js:2:12:2:22 | { foo: 42 } | lib/nested/a.js:2:12:2:22 | { foo: 42 } |
| test_range.js:1:1:3:2 | test.am ... 2 };\\n}) | test_range.js:2:12:2:22 | { foo: 42 } | test_range.js:2:12:2:22 | { foo: 42 } |
| tst4.js:1:1:11:2 | define( ... };\\n}) | tst4.js:7:12:10:5 | {\\n ... r\\n } | tst4.js:7:12:10:5 | {\\n ... r\\n } |
| tst5.js:1:1:6:2 | define( ... };\\n}) | tst5.js:2:12:5:5 | {\\n ... r\\n } | tst5.js:2:12:5:5 | {\\n ... r\\n } |
| tst.js:1:1:6:2 | define( ... };\\n}) | tst.js:2:12:5:5 | {\\n ... r\\n } | tst.js:2:12:5:5 | {\\n ... r\\n } |

View File

@@ -1,5 +1,9 @@
import javascript
class TestAmdModuleRange extends AmdModuleDefinition::Range {
TestAmdModuleRange() { this.getCallee().(PropAccess).getQualifiedName() = "test.amd.range" }
}
query predicate amoModule_exports(Module m, string name, DataFlow::Node exportValue) {
exportValue = m.getAnExportedValue(name)
}

View File

@@ -0,0 +1,198 @@
nodes
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
| tst.html:1:5:1:9 | [ExprStmt] using | semmle.label | [ExprStmt] using |
| tst.html:1:5:1:9 | [ExprStmt] using | semmle.order | 1 |
| tst.html:1:5:1:9 | [VarRef] using | semmle.label | [VarRef] using |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | semmle.label | [FunctionDeclStmt] functio ... } } |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | semmle.order | 2 |
| tst.js:1:10:1:10 | [VarDecl] g | semmle.label | [VarDecl] g |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | semmle.label | [BlockStmt] { u ... } } |
| tst.js:2:5:2:33 | [DeclStmt] using stream = ... | semmle.label | [DeclStmt] using stream = ... |
| tst.js:2:11:2:16 | [VarDecl] stream | semmle.label | [VarDecl] stream |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | semmle.label | [VariableDeclarator] stream ... ource() |
| tst.js:2:20:2:30 | [VarRef] getResource | semmle.label | [VarRef] getResource |
| tst.js:2:20:2:32 | [CallExpr] getResource() | semmle.label | [CallExpr] getResource() |
| tst.js:4:5:4:7 | [VarRef] let | semmle.label | [VarRef] let |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | semmle.label | [CallExpr] let (test = 20) |
| tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | semmle.label | [ExprStmt] let (test = 20); |
| tst.js:4:10:4:13 | [VarRef] test | semmle.label | [VarRef] test |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | semmle.label | [AssignExpr] test = 20 |
| tst.js:4:17:4:18 | [Literal] 20 | semmle.label | [Literal] 20 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | semmle.label | [ForStmt] for (us ... ; } |
| tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | semmle.label | [DeclStmt] using stream2 = ... |
| tst.js:6:16:6:22 | [VarDecl] stream2 | semmle.label | [VarDecl] stream2 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | semmle.label | [VariableDeclarator] stream2 ... ource() |
| tst.js:6:26:6:36 | [VarRef] getResource | semmle.label | [VarRef] getResource |
| tst.js:6:26:6:38 | [CallExpr] getResource() | semmle.label | [CallExpr] getResource() |
| tst.js:6:45:9:5 | [BlockStmt] { ... ; } | semmle.label | [BlockStmt] { ... ; } |
| tst.js:8:9:8:14 | [BreakStmt] break; | semmle.label | [BreakStmt] break; |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | semmle.label | [FunctionDeclStmt] async f ... nd"); } |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | semmle.order | 3 |
| tst.js:12:16:12:16 | [VarDecl] h | semmle.label | [VarDecl] h |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | semmle.label | [BlockStmt] { a ... nd"); } |
| tst.js:13:5:13:39 | [DeclStmt] using stream = ... | semmle.label | [DeclStmt] using stream = ... |
| tst.js:13:17:13:22 | [VarDecl] stream | semmle.label | [VarDecl] stream |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | semmle.label | [VariableDeclarator] stream ... ource() |
| tst.js:13:26:13:36 | [VarRef] getResource | semmle.label | [VarRef] getResource |
| tst.js:13:26:13:38 | [CallExpr] getResource() | semmle.label | [CallExpr] getResource() |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | semmle.label | [ForStmt] for (aw ... ; } |
| tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | semmle.label | [DeclStmt] using stream2 = ... |
| tst.js:15:22:15:28 | [VarDecl] stream2 | semmle.label | [VarDecl] stream2 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | semmle.label | [VariableDeclarator] stream2 ... ource() |
| tst.js:15:32:15:42 | [VarRef] getResource | semmle.label | [VarRef] getResource |
| tst.js:15:32:15:44 | [CallExpr] getResource() | semmle.label | [CallExpr] getResource() |
| tst.js:15:51:18:5 | [BlockStmt] { ... ; } | semmle.label | [BlockStmt] { ... ; } |
| tst.js:17:9:17:14 | [BreakStmt] break; | semmle.label | [BreakStmt] break; |
| tst.js:20:5:20:11 | [VarRef] console | semmle.label | [VarRef] console |
| tst.js:20:5:20:15 | [DotExpr] console.log | semmle.label | [DotExpr] console.log |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | semmle.label | [MethodCallExpr] console.log("end") |
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | semmle.label | [ExprStmt] console.log("end"); |
| tst.js:20:13:20:15 | [Label] log | semmle.label | [Label] log |
| tst.js:20:17:20:21 | [Literal] "end" | semmle.label | [Literal] "end" |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | semmle.label | [FunctionDeclStmt] functio ... ing); } |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | semmle.order | 4 |
| tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.label | [VarDecl] usesUsing |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.label | [BlockStmt] { u ... ing); } |
| tst.js:24:5:24:9 | [VarRef] using | semmle.label | [VarRef] using |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | semmle.label | [CallExpr] using("foo") |
| tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.label | [ExprStmt] using("foo"); |
| tst.js:24:11:24:15 | [Literal] "foo" | semmle.label | [Literal] "foo" |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.label | [FunctionDeclStmt] functio ... . } |
| tst.js:25:14:25:18 | [VarDecl] using | semmle.label | [VarDecl] using |
| tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.label | [SimpleParameter] foo |
| tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.label | [BlockStmt] { ... . } |
| tst.js:28:5:28:9 | [VarRef] using | semmle.label | [VarRef] using |
| tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.label | [CallExpr] using(using) |
| tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.label | [ExprStmt] using(using); |
| tst.js:28:11:28:15 | [VarRef] using | semmle.label | [VarRef] using |
edges
| file://:0:0:0:0 | (Arguments) | tst.js:4:10:4:18 | [AssignExpr] test = 20 | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:4:10:4:18 | [AssignExpr] test = 20 | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:20:17:20:21 | [Literal] "end" | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:20:17:20:21 | [Literal] "end" | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:24:11:24:15 | [Literal] "foo" | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:24:11:24:15 | [Literal] "foo" | semmle.order | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:28:11:28:15 | [VarRef] using | semmle.label | 0 |
| file://:0:0:0:0 | (Arguments) | tst.js:28:11:28:15 | [VarRef] using | semmle.order | 0 |
| file://:0:0:0:0 | (Parameters) | tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.label | 0 |
| file://:0:0:0:0 | (Parameters) | tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.order | 0 |
| tst.html:1:5:1:9 | [ExprStmt] using | tst.html:1:5:1:9 | [VarRef] using | semmle.label | 1 |
| tst.html:1:5:1:9 | [ExprStmt] using | tst.html:1:5:1:9 | [VarRef] using | semmle.order | 1 |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:10:1:10 | [VarDecl] g | semmle.label | 0 |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:10:1:10 | [VarDecl] g | semmle.order | 0 |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:14:10:1 | [BlockStmt] { u ... } } | semmle.label | 5 |
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:14:10:1 | [BlockStmt] { u ... } } | semmle.order | 5 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:2:5:2:33 | [DeclStmt] using stream = ... | semmle.label | 1 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:2:5:2:33 | [DeclStmt] using stream = ... | semmle.order | 1 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | semmle.label | 2 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | semmle.order | 2 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | semmle.label | 3 |
| tst.js:1:14:10:1 | [BlockStmt] { u ... } } | tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | semmle.order | 3 |
| tst.js:2:5:2:33 | [DeclStmt] using stream = ... | tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | semmle.label | 1 |
| tst.js:2:5:2:33 | [DeclStmt] using stream = ... | tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | semmle.order | 1 |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | tst.js:2:11:2:16 | [VarDecl] stream | semmle.label | 1 |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | tst.js:2:11:2:16 | [VarDecl] stream | semmle.order | 1 |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | tst.js:2:20:2:32 | [CallExpr] getResource() | semmle.label | 2 |
| tst.js:2:11:2:32 | [VariableDeclarator] stream ... ource() | tst.js:2:20:2:32 | [CallExpr] getResource() | semmle.order | 2 |
| tst.js:2:20:2:32 | [CallExpr] getResource() | tst.js:2:20:2:30 | [VarRef] getResource | semmle.label | 0 |
| tst.js:2:20:2:32 | [CallExpr] getResource() | tst.js:2:20:2:30 | [VarRef] getResource | semmle.order | 0 |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | tst.js:4:5:4:7 | [VarRef] let | semmle.label | 0 |
| tst.js:4:5:4:19 | [CallExpr] let (test = 20) | tst.js:4:5:4:7 | [VarRef] let | semmle.order | 0 |
| tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | tst.js:4:5:4:19 | [CallExpr] let (test = 20) | semmle.label | 1 |
| tst.js:4:5:4:20 | [ExprStmt] let (test = 20); | tst.js:4:5:4:19 | [CallExpr] let (test = 20) | semmle.order | 1 |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | tst.js:4:10:4:13 | [VarRef] test | semmle.label | 1 |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | tst.js:4:10:4:13 | [VarRef] test | semmle.order | 1 |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | tst.js:4:17:4:18 | [Literal] 20 | semmle.label | 2 |
| tst.js:4:10:4:18 | [AssignExpr] test = 20 | tst.js:4:17:4:18 | [Literal] 20 | semmle.order | 2 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | semmle.label | 1 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | semmle.order | 1 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | tst.js:6:45:9:5 | [BlockStmt] { ... ; } | semmle.label | 2 |
| tst.js:6:5:9:5 | [ForStmt] for (us ... ; } | tst.js:6:45:9:5 | [BlockStmt] { ... ; } | semmle.order | 2 |
| tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | semmle.label | 1 |
| tst.js:6:10:6:38 | [DeclStmt] using stream2 = ... | tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | semmle.order | 1 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | tst.js:6:16:6:22 | [VarDecl] stream2 | semmle.label | 1 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | tst.js:6:16:6:22 | [VarDecl] stream2 | semmle.order | 1 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | tst.js:6:26:6:38 | [CallExpr] getResource() | semmle.label | 2 |
| tst.js:6:16:6:38 | [VariableDeclarator] stream2 ... ource() | tst.js:6:26:6:38 | [CallExpr] getResource() | semmle.order | 2 |
| tst.js:6:26:6:38 | [CallExpr] getResource() | tst.js:6:26:6:36 | [VarRef] getResource | semmle.label | 0 |
| tst.js:6:26:6:38 | [CallExpr] getResource() | tst.js:6:26:6:36 | [VarRef] getResource | semmle.order | 0 |
| tst.js:6:45:9:5 | [BlockStmt] { ... ; } | tst.js:8:9:8:14 | [BreakStmt] break; | semmle.label | 1 |
| tst.js:6:45:9:5 | [BlockStmt] { ... ; } | tst.js:8:9:8:14 | [BreakStmt] break; | semmle.order | 1 |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | tst.js:12:16:12:16 | [VarDecl] h | semmle.label | 0 |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | tst.js:12:16:12:16 | [VarDecl] h | semmle.order | 0 |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | semmle.label | 5 |
| tst.js:12:1:21:1 | [FunctionDeclStmt] async f ... nd"); } | tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | semmle.order | 5 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:13:5:13:39 | [DeclStmt] using stream = ... | semmle.label | 1 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:13:5:13:39 | [DeclStmt] using stream = ... | semmle.order | 1 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | semmle.label | 2 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | semmle.order | 2 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | semmle.label | 3 |
| tst.js:12:20:21:1 | [BlockStmt] { a ... nd"); } | tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | semmle.order | 3 |
| tst.js:13:5:13:39 | [DeclStmt] using stream = ... | tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | semmle.label | 1 |
| tst.js:13:5:13:39 | [DeclStmt] using stream = ... | tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | semmle.order | 1 |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | tst.js:13:17:13:22 | [VarDecl] stream | semmle.label | 1 |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | tst.js:13:17:13:22 | [VarDecl] stream | semmle.order | 1 |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | tst.js:13:26:13:38 | [CallExpr] getResource() | semmle.label | 2 |
| tst.js:13:17:13:38 | [VariableDeclarator] stream ... ource() | tst.js:13:26:13:38 | [CallExpr] getResource() | semmle.order | 2 |
| tst.js:13:26:13:38 | [CallExpr] getResource() | tst.js:13:26:13:36 | [VarRef] getResource | semmle.label | 0 |
| tst.js:13:26:13:38 | [CallExpr] getResource() | tst.js:13:26:13:36 | [VarRef] getResource | semmle.order | 0 |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | semmle.label | 1 |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | semmle.order | 1 |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | tst.js:15:51:18:5 | [BlockStmt] { ... ; } | semmle.label | 2 |
| tst.js:15:5:18:5 | [ForStmt] for (aw ... ; } | tst.js:15:51:18:5 | [BlockStmt] { ... ; } | semmle.order | 2 |
| tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | semmle.label | 1 |
| tst.js:15:16:15:44 | [DeclStmt] using stream2 = ... | tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | semmle.order | 1 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | tst.js:15:22:15:28 | [VarDecl] stream2 | semmle.label | 1 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | tst.js:15:22:15:28 | [VarDecl] stream2 | semmle.order | 1 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | tst.js:15:32:15:44 | [CallExpr] getResource() | semmle.label | 2 |
| tst.js:15:22:15:44 | [VariableDeclarator] stream2 ... ource() | tst.js:15:32:15:44 | [CallExpr] getResource() | semmle.order | 2 |
| tst.js:15:32:15:44 | [CallExpr] getResource() | tst.js:15:32:15:42 | [VarRef] getResource | semmle.label | 0 |
| tst.js:15:32:15:44 | [CallExpr] getResource() | tst.js:15:32:15:42 | [VarRef] getResource | semmle.order | 0 |
| tst.js:15:51:18:5 | [BlockStmt] { ... ; } | tst.js:17:9:17:14 | [BreakStmt] break; | semmle.label | 1 |
| tst.js:15:51:18:5 | [BlockStmt] { ... ; } | tst.js:17:9:17:14 | [BreakStmt] break; | semmle.order | 1 |
| tst.js:20:5:20:15 | [DotExpr] console.log | tst.js:20:5:20:11 | [VarRef] console | semmle.label | 1 |
| tst.js:20:5:20:15 | [DotExpr] console.log | tst.js:20:5:20:11 | [VarRef] console | semmle.order | 1 |
| tst.js:20:5:20:15 | [DotExpr] console.log | tst.js:20:13:20:15 | [Label] log | semmle.label | 2 |
| tst.js:20:5:20:15 | [DotExpr] console.log | tst.js:20:13:20:15 | [Label] log | semmle.order | 2 |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | tst.js:20:5:20:15 | [DotExpr] console.log | semmle.label | 0 |
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | tst.js:20:5:20:15 | [DotExpr] console.log | semmle.order | 0 |
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | semmle.label | 1 |
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | semmle.order | 1 |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.label | 0 |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.order | 0 |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.label | 5 |
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.order | 5 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.label | 1 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.order | 1 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.label | 2 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.order | 2 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.label | 3 |
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.order | 3 |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | tst.js:24:5:24:9 | [VarRef] using | semmle.label | 0 |
| tst.js:24:5:24:16 | [CallExpr] using("foo") | tst.js:24:5:24:9 | [VarRef] using | semmle.order | 0 |
| tst.js:24:5:24:17 | [ExprStmt] using("foo"); | tst.js:24:5:24:16 | [CallExpr] using("foo") | semmle.label | 1 |
| tst.js:24:5:24:17 | [ExprStmt] using("foo"); | tst.js:24:5:24:16 | [CallExpr] using("foo") | semmle.order | 1 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | file://:0:0:0:0 | (Parameters) | semmle.label | 1 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | file://:0:0:0:0 | (Parameters) | semmle.order | 1 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:14:25:18 | [VarDecl] using | semmle.label | 0 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:14:25:18 | [VarDecl] using | semmle.order | 0 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.label | 5 |
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.order | 5 |
| tst.js:28:5:28:16 | [CallExpr] using(using) | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
| tst.js:28:5:28:16 | [CallExpr] using(using) | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
| tst.js:28:5:28:16 | [CallExpr] using(using) | tst.js:28:5:28:9 | [VarRef] using | semmle.label | 0 |
| tst.js:28:5:28:16 | [CallExpr] using(using) | tst.js:28:5:28:9 | [VarRef] using | semmle.order | 0 |
| tst.js:28:5:28:17 | [ExprStmt] using(using); | tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.label | 1 |
| tst.js:28:5:28:17 | [ExprStmt] using(using); | tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.order | 1 |
graphProperties
| semmle.graphKind | tree |

View File

@@ -0,0 +1,2 @@
import javascript
import semmle.javascript.PrintAst

View File

@@ -0,0 +1,2 @@
<%= using %>
<!-- the above should not crash-->

View File

@@ -0,0 +1,29 @@
function g() {
using stream = getResource();
let (test = 20); // <- I didn't know this was a thing
for (using stream2 = getResource(); ; ) {
// ...
break;
}
}
async function h() {
await using stream = getResource();
for (await using stream2 = getResource(); ; ) {
// ...
break;
}
console.log("end");
}
function usesUsing() {
using("foo");
function using(foo) {
// ...
}
using(using);
}

View File

@@ -0,0 +1,19 @@
import 'dummy';
function fooFactoryFactory() {
return function fooFactory() {
return function foo() {
/** calls:F.member */
this.member();
}
}
}
function F() {
this.foo = fooFactoryFactory()();
}
/** name:F.member */
F.prototype.member = function() {
return 42;
};

View File

@@ -1,3 +0,0 @@
import javascript
query predicate test_getACallee(DataFlow::InvokeNode c, Function res) { res = c.getACallee() }

View File

@@ -1,5 +0,0 @@
import javascript
query predicate test_getAFunctionValue(DataFlow::Node node, DataFlow::FunctionNode res) {
res = node.getAFunctionValue()
}

View File

@@ -1,5 +0,0 @@
import javascript
query predicate test_getAnArgument(DataFlow::InvokeNode invk, DataFlow::Node res) {
res = invk.getAnArgument()
}

View File

@@ -1,5 +0,0 @@
import javascript
query predicate test_getArgument(DataFlow::InvokeNode invk, int i, DataFlow::Node res) {
res = invk.getArgument(i)
}

View File

@@ -1,5 +0,0 @@
import javascript
query predicate test_getCalleeName(DataFlow::InvokeNode invk, string res) {
res = invk.getCalleeName()
}

View File

@@ -1,5 +0,0 @@
import javascript
query predicate test_getCalleeNode(DataFlow::InvokeNode invk, DataFlow::Node res) {
res = invk.getCalleeNode()
}

View File

@@ -1,5 +0,0 @@
import javascript
query predicate test_getLastArgument(DataFlow::InvokeNode invk, DataFlow::Node res) {
res = invk.getLastArgument()
}

View File

@@ -1,5 +0,0 @@
import javascript
query predicate test_getNumArgument(DataFlow::InvokeNode invk, int res) {
res = invk.getNumArgument()
}

View File

@@ -1,3 +0,0 @@
import javascript
query predicate test_isImprecise(DataFlow::InvokeNode invk) { invk.isImprecise() }

View File

@@ -1,3 +0,0 @@
import javascript
query predicate test_isIncomplete(DataFlow::InvokeNode invk) { invk.isIncomplete() }

View File

@@ -1,3 +0,0 @@
import javascript
query predicate test_isUncertain(DataFlow::InvokeNode invk) { invk.isUncertain() }

View File

@@ -0,0 +1,5 @@
function fooTag(strings, par1, par2) {
}
fooTag`hello ${arg1} world ${arg2}`

View File

@@ -126,6 +126,8 @@ test_getAFunctionValue
| strict.js:1:1:8:2 | (functi ... ode.\\n}) | strict.js:1:2:8:1 | functio ... mode.\\n} |
| strict.js:1:2:8:1 | functio ... mode.\\n} | strict.js:1:2:8:1 | functio ... mode.\\n} |
| strict.js:3:5:5:5 | functio ... ;\\n } | strict.js:3:5:5:5 | functio ... ;\\n } |
| taggedTemplate.js:1:1:3:1 | functio ... 2) {\\n\\n} | taggedTemplate.js:1:1:3:1 | functio ... 2) {\\n\\n} |
| taggedTemplate.js:5:1:5:6 | fooTag | taggedTemplate.js:1:1:3:1 | functio ... 2) {\\n\\n} |
| tst3.js:1:1:1:22 | functio ... fn() {} | tst3.js:1:1:1:22 | functio ... fn() {} |
| tst3.js:2:1:2:23 | functio ... n2() {} | tst3.js:2:1:2:23 | functio ... n2() {} |
| tst.js:1:1:1:15 | function f() {} | tst.js:1:1:1:15 | function f() {} |
@@ -133,6 +135,7 @@ test_getAFunctionValue
| tst.js:3:1:3:1 | h | tst.js:3:5:3:17 | function() {} |
| tst.js:3:1:3:17 | h = function() {} | tst.js:3:5:3:17 | function() {} |
| tst.js:3:5:3:17 | function() {} | tst.js:3:5:3:17 | function() {} |
| tst.js:4:1:4:1 | k | tst.js:2:9:2:21 | function() {} |
| tst.js:4:1:4:5 | k = g | tst.js:2:9:2:21 | function() {} |
| tst.js:4:5:4:5 | g | tst.js:2:9:2:21 | function() {} |
| tst.js:6:1:6:1 | f | tst.js:1:1:1:15 | function f() {} |
@@ -140,13 +143,23 @@ test_getAFunctionValue
| tst.js:8:1:8:1 | h | tst.js:3:5:3:17 | function() {} |
| tst.js:9:1:9:1 | k | tst.js:2:9:2:21 | function() {} |
| tst.js:11:1:20:1 | functio ... \\tf();\\n} | tst.js:11:1:20:1 | functio ... \\tf();\\n} |
| tst.js:11:12:11:12 | m | tst.js:2:9:2:21 | function() {} |
| tst.js:11:12:11:12 | m | tst.js:2:9:2:21 | function() {} |
| tst.js:12:6:12:6 | m | tst.js:2:9:2:21 | function() {} |
| tst.js:12:6:12:27 | n | tst.js:2:9:2:21 | function() {} |
| tst.js:12:6:12:27 | n | tst.js:12:15:12:27 | function() {} |
| tst.js:12:10:12:10 | m | tst.js:2:9:2:21 | function() {} |
| tst.js:12:10:12:10 | m | tst.js:2:9:2:21 | function() {} |
| tst.js:12:10:12:10 | m | tst.js:2:9:2:21 | function() {} |
| tst.js:12:10:12:27 | m \|\| function() {} | tst.js:2:9:2:21 | function() {} |
| tst.js:12:10:12:27 | m \|\| function() {} | tst.js:12:15:12:27 | function() {} |
| tst.js:12:15:12:27 | function() {} | tst.js:12:15:12:27 | function() {} |
| tst.js:13:2:13:16 | function p() {} | tst.js:13:2:13:16 | function p() {} |
| tst.js:13:11:13:11 | p | tst.js:13:2:13:16 | function p() {} |
| tst.js:14:2:14:2 | m | tst.js:2:9:2:21 | function() {} |
| tst.js:15:2:15:2 | l | tst.js:11:1:20:1 | functio ... \\tf();\\n} |
| tst.js:16:2:16:17 | arguments.callee | tst.js:11:1:20:1 | functio ... \\tf();\\n} |
| tst.js:17:2:17:2 | n | tst.js:2:9:2:21 | function() {} |
| tst.js:17:2:17:2 | n | tst.js:12:15:12:27 | function() {} |
| tst.js:18:2:18:2 | p | tst.js:13:2:13:16 | function p() {} |
| tst.js:19:2:19:2 | f | tst.js:1:1:1:15 | function f() {} |
@@ -221,6 +234,8 @@ test_getArgument
| reflection.js:7:1:7:22 | reflective call | 1 | reflection.js:7:20:7:21 | 19 |
| reflection.js:8:1:8:25 | add.app ... 3, 19]) | 0 | reflection.js:8:11:8:14 | null |
| reflection.js:8:1:8:25 | add.app ... 3, 19]) | 1 | reflection.js:8:17:8:24 | [23, 19] |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | 1 | taggedTemplate.js:5:16:5:19 | arg1 |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | 2 | taggedTemplate.js:5:30:5:33 | arg2 |
| tst.js:22:1:22:4 | l(k) | 0 | tst.js:22:3:22:3 | k |
| tst.js:42:2:42:29 | functio ... x; }(o) | 0 | tst.js:42:28:42:28 | o |
test_getNumArgument
@@ -259,6 +274,7 @@ test_getNumArgument
| strict2.js:9:10:9:14 | foo() | 0 |
| strict.js:1:1:8:4 | (functi ... e.\\n})() | 0 |
| strict.js:7:10:7:14 | foo() | 0 |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | 3 |
| tst.js:6:1:6:3 | f() | 0 |
| tst.js:7:1:7:3 | g() | 0 |
| tst.js:8:1:8:3 | h() | 0 |
@@ -362,6 +378,7 @@ test_getCalleeNode
| strict2.js:9:10:9:14 | foo() | strict2.js:9:10:9:12 | foo |
| strict.js:1:1:8:4 | (functi ... e.\\n})() | strict.js:1:1:8:2 | (functi ... ode.\\n}) |
| strict.js:7:10:7:14 | foo() | strict.js:7:10:7:12 | foo |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | taggedTemplate.js:5:1:5:6 | fooTag |
| tst.js:6:1:6:3 | f() | tst.js:6:1:6:1 | f |
| tst.js:7:1:7:3 | g() | tst.js:7:1:7:1 | g |
| tst.js:8:1:8:3 | h() | tst.js:8:1:8:1 | h |
@@ -400,6 +417,7 @@ test_getLastArgument
| reflection.js:7:1:7:22 | add.cal ... 23, 19) | reflection.js:7:20:7:21 | 19 |
| reflection.js:7:1:7:22 | reflective call | reflection.js:7:20:7:21 | 19 |
| reflection.js:8:1:8:25 | add.app ... 3, 19]) | reflection.js:8:17:8:24 | [23, 19] |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | taggedTemplate.js:5:30:5:33 | arg2 |
| tst.js:22:1:22:4 | l(k) | tst.js:22:3:22:3 | k |
| tst.js:42:2:42:29 | functio ... x; }(o) | tst.js:42:28:42:28 | o |
test_getAnArgument
@@ -420,6 +438,8 @@ test_getAnArgument
| reflection.js:7:1:7:22 | reflective call | reflection.js:7:20:7:21 | 19 |
| reflection.js:8:1:8:25 | add.app ... 3, 19]) | reflection.js:8:11:8:14 | null |
| reflection.js:8:1:8:25 | add.app ... 3, 19]) | reflection.js:8:17:8:24 | [23, 19] |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | taggedTemplate.js:5:16:5:19 | arg1 |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | taggedTemplate.js:5:30:5:33 | arg2 |
| tst.js:22:1:22:4 | l(k) | tst.js:22:3:22:3 | k |
| tst.js:42:2:42:29 | functio ... x; }(o) | tst.js:42:28:42:28 | o |
test_getACallee
@@ -449,12 +469,15 @@ test_getACallee
| reflection.js:8:1:8:25 | reflective call | reflection.js:1:1:3:1 | functio ... x+y;\\n} |
| strict2.js:2:1:10:4 | (functi ... e.\\n})() | strict2.js:2:2:10:1 | functio ... mode.\\n} |
| strict.js:1:1:8:4 | (functi ... e.\\n})() | strict.js:1:2:8:1 | functio ... mode.\\n} |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | taggedTemplate.js:1:1:3:1 | functio ... 2) {\\n\\n} |
| tst.js:6:1:6:3 | f() | tst.js:1:1:1:15 | function f() {} |
| tst.js:7:1:7:3 | g() | tst.js:2:9:2:21 | function() {} |
| tst.js:8:1:8:3 | h() | tst.js:3:5:3:17 | function() {} |
| tst.js:9:1:9:3 | k() | tst.js:2:9:2:21 | function() {} |
| tst.js:14:2:14:4 | m() | tst.js:2:9:2:21 | function() {} |
| tst.js:15:2:15:4 | l() | tst.js:11:1:20:1 | functio ... \\tf();\\n} |
| tst.js:16:2:16:19 | arguments.callee() | tst.js:11:1:20:1 | functio ... \\tf();\\n} |
| tst.js:17:2:17:4 | n() | tst.js:2:9:2:21 | function() {} |
| tst.js:17:2:17:4 | n() | tst.js:12:15:12:27 | function() {} |
| tst.js:18:2:18:4 | p() | tst.js:13:2:13:16 | function p() {} |
| tst.js:19:2:19:4 | f() | tst.js:1:1:1:15 | function f() {} |
@@ -509,6 +532,7 @@ test_getCalleeName
| reflection.js:8:1:8:25 | add.app ... 3, 19]) | apply |
| strict2.js:9:10:9:14 | foo() | foo |
| strict.js:7:10:7:14 | foo() | foo |
| taggedTemplate.js:5:1:5:35 | fooTag` ... {arg2}` | fooTag |
| tst.js:6:1:6:3 | f() | f |
| tst.js:7:1:7:3 | g() | g |
| tst.js:8:1:8:3 | h() | h |

View File

@@ -1,11 +1,37 @@
import isUncertain
import getAFunctionValue
import getArgument
import getNumArgument
import isIncomplete
import getCalleeNode
import getLastArgument
import getAnArgument
import getACallee
import getCalleeName
import isImprecise
import javascript
query predicate test_isUncertain(DataFlow::InvokeNode invk) { invk.isUncertain() }
query predicate test_getAFunctionValue(DataFlow::Node node, DataFlow::FunctionNode res) {
res = node.getAFunctionValue()
}
query predicate test_getArgument(DataFlow::InvokeNode invk, int i, DataFlow::Node res) {
res = invk.getArgument(i)
}
query predicate test_getNumArgument(DataFlow::InvokeNode invk, int res) {
res = invk.getNumArgument()
}
query predicate test_isIncomplete(DataFlow::InvokeNode invk) { invk.isIncomplete() }
query predicate test_getCalleeNode(DataFlow::InvokeNode invk, DataFlow::Node res) {
res = invk.getCalleeNode()
}
query predicate test_getLastArgument(DataFlow::InvokeNode invk, DataFlow::Node res) {
res = invk.getLastArgument()
}
query predicate test_getAnArgument(DataFlow::InvokeNode invk, DataFlow::Node res) {
res = invk.getAnArgument()
}
query predicate test_getACallee(DataFlow::InvokeNode c, Function res) { res = c.getACallee() }
query predicate test_getCalleeName(DataFlow::InvokeNode invk, string res) {
res = invk.getCalleeName()
}
query predicate test_isImprecise(DataFlow::InvokeNode invk) { invk.isImprecise() }

View File

@@ -1,3 +1,89 @@
#select
| tst2.ts:1:13:1:21 | <number>1 |
| tst2.ts:1:21:1:21 | 1 |
| tst.js:1:1:1:3 | "a" |
| tst.js:2:1:2:3 | "b" |
| tst.js:2:1:2:9 | "b" + "c" |
| tst.js:2:7:2:9 | "c" |
| tst.js:3:1:3:3 | "d" |
| tst.js:3:1:3:9 | "d" + "e" |
| tst.js:3:1:3:15 | "d" + "e" + "f" |
| tst.js:3:7:3:9 | "e" |
| tst.js:3:13:3:15 | "f" |
| tst.js:4:1:4:3 | `g` |
| tst.js:4:1:4:9 | `g` + `h` |
| tst.js:4:2:4:2 | g |
| tst.js:4:7:4:9 | `h` |
| tst.js:4:8:4:8 | h |
| tst.js:6:1:6:1 | 1 |
| tst.js:8:1:8:5 | false |
| tst.js:9:1:9:4 | true |
| tst.js:11:1:11:2 | -1 |
| tst.js:11:2:11:2 | 1 |
| tst.js:12:1:12:2 | !0 |
| tst.js:12:2:12:2 | 0 |
| tst.js:14:1:14:4 | null |
| tst.js:16:1:16:9 | undefined |
| tst.js:24:2:24:9 | `${"x"}` |
| tst.js:24:5:24:7 | "x" |
| tst.js:26:1:26:3 | !!0 |
| tst.js:26:2:26:3 | !0 |
| tst.js:26:3:26:3 | 0 |
| tst.js:27:1:27:4 | !!`` |
| tst.js:27:2:27:4 | !`` |
| tst.js:27:3:27:4 | `` |
| tst.js:29:1:29:6 | void 0 |
| tst.js:29:6:29:6 | 0 |
| tst.js:30:1:30:8 | void f() |
| tst.js:32:1:32:3 | NaN |
| tst.js:33:1:33:8 | Infinity |
| tst.js:35:1:35:1 | 1 |
| tst.js:35:1:35:5 | 1 + 2 |
| tst.js:35:1:35:9 | 1 + 2 + 3 |
| tst.js:35:5:35:5 | 2 |
| tst.js:35:9:35:9 | 3 |
| tst.js:37:1:37:3 | (1) |
| tst.js:37:2:37:2 | 1 |
| tst.js:39:1:39:4 | f, 1 |
| tst.js:39:4:39:4 | 1 |
| tst.js:40:1:40:1 | 1 |
| tst.js:42:1:42:1 | 1 |
| tst.js:42:1:42:7 | 1? 2: 3 |
| tst.js:42:4:42:4 | 2 |
| tst.js:42:7:42:7 | 3 |
| tst.js:43:4:43:4 | 2 |
| tst.js:43:7:43:7 | 3 |
| tst.js:44:1:44:1 | 1 |
| tst.js:44:7:44:7 | 3 |
| tst.js:45:1:45:1 | 1 |
| tst.js:45:4:45:4 | 2 |
| tst.js:47:1:47:5 | x = 1 |
| tst.js:47:5:47:5 | 1 |
| tst.js:48:1:48:7 | x.p = 1 |
| tst.js:48:7:48:7 | 1 |
| tst.js:49:6:49:6 | 1 |
| tst.js:52:1:52:9 | x = 1_000 |
| tst.js:52:5:52:9 | 1_000 |
| tst.js:53:1:53:13 | x = 1_000_123 |
| tst.js:53:5:53:13 | 1_000_123 |
| tst.js:54:1:54:17 | x = 1_000_000_000 |
| tst.js:54:5:54:17 | 1_000_000_000 |
| tst.js:55:1:55:18 | x = 101_475_938.38 |
| tst.js:55:5:55:18 | 101_475_938.38 |
| tst.js:56:1:56:10 | x = 123_00 |
| tst.js:56:5:56:10 | 123_00 |
| tst.js:57:1:57:10 | x = 12_300 |
| tst.js:57:5:57:10 | 12_300 |
| tst.js:58:1:58:12 | x = 12345_00 |
| tst.js:58:5:58:12 | 12345_00 |
| tst.js:59:1:59:12 | x = 123_4500 |
| tst.js:59:5:59:12 | 123_4500 |
| tst.js:60:1:60:13 | x = 1_234_500 |
| tst.js:60:5:60:13 | 1_234_500 |
| tst.js:61:1:61:10 | x = 1e1_00 |
| tst.js:61:5:61:10 | 1e1_00 |
| tst.js:62:1:62:14 | x = 0xaa_bb_cc |
| tst.js:62:5:62:14 | 0xaa_bb_cc |
getIntValue
| tst2.ts:1:21:1:21 | 1 | 1 |
| tst.js:6:1:6:1 | 1 | 1 |
@@ -117,89 +203,3 @@ getLiteralValue
| tst.js:60:5:60:13 | 1_234_500 | 1234500 |
| tst.js:61:5:61:10 | 1e1_00 | 1.0E100 |
| tst.js:62:5:62:14 | 0xaa_bb_cc | 11189196 |
#select
| tst2.ts:1:13:1:21 | <number>1 |
| tst2.ts:1:21:1:21 | 1 |
| tst.js:1:1:1:3 | "a" |
| tst.js:2:1:2:3 | "b" |
| tst.js:2:1:2:9 | "b" + "c" |
| tst.js:2:7:2:9 | "c" |
| tst.js:3:1:3:3 | "d" |
| tst.js:3:1:3:9 | "d" + "e" |
| tst.js:3:1:3:15 | "d" + "e" + "f" |
| tst.js:3:7:3:9 | "e" |
| tst.js:3:13:3:15 | "f" |
| tst.js:4:1:4:3 | `g` |
| tst.js:4:1:4:9 | `g` + `h` |
| tst.js:4:2:4:2 | g |
| tst.js:4:7:4:9 | `h` |
| tst.js:4:8:4:8 | h |
| tst.js:6:1:6:1 | 1 |
| tst.js:8:1:8:5 | false |
| tst.js:9:1:9:4 | true |
| tst.js:11:1:11:2 | -1 |
| tst.js:11:2:11:2 | 1 |
| tst.js:12:1:12:2 | !0 |
| tst.js:12:2:12:2 | 0 |
| tst.js:14:1:14:4 | null |
| tst.js:16:1:16:9 | undefined |
| tst.js:24:2:24:9 | `${"x"}` |
| tst.js:24:5:24:7 | "x" |
| tst.js:26:1:26:3 | !!0 |
| tst.js:26:2:26:3 | !0 |
| tst.js:26:3:26:3 | 0 |
| tst.js:27:1:27:4 | !!`` |
| tst.js:27:2:27:4 | !`` |
| tst.js:27:3:27:4 | `` |
| tst.js:29:1:29:6 | void 0 |
| tst.js:29:6:29:6 | 0 |
| tst.js:30:1:30:8 | void f() |
| tst.js:32:1:32:3 | NaN |
| tst.js:33:1:33:8 | Infinity |
| tst.js:35:1:35:1 | 1 |
| tst.js:35:1:35:5 | 1 + 2 |
| tst.js:35:1:35:9 | 1 + 2 + 3 |
| tst.js:35:5:35:5 | 2 |
| tst.js:35:9:35:9 | 3 |
| tst.js:37:1:37:3 | (1) |
| tst.js:37:2:37:2 | 1 |
| tst.js:39:1:39:4 | f, 1 |
| tst.js:39:4:39:4 | 1 |
| tst.js:40:1:40:1 | 1 |
| tst.js:42:1:42:1 | 1 |
| tst.js:42:1:42:7 | 1? 2: 3 |
| tst.js:42:4:42:4 | 2 |
| tst.js:42:7:42:7 | 3 |
| tst.js:43:4:43:4 | 2 |
| tst.js:43:7:43:7 | 3 |
| tst.js:44:1:44:1 | 1 |
| tst.js:44:7:44:7 | 3 |
| tst.js:45:1:45:1 | 1 |
| tst.js:45:4:45:4 | 2 |
| tst.js:47:1:47:5 | x = 1 |
| tst.js:47:5:47:5 | 1 |
| tst.js:48:1:48:7 | x.p = 1 |
| tst.js:48:7:48:7 | 1 |
| tst.js:49:6:49:6 | 1 |
| tst.js:52:1:52:9 | x = 1_000 |
| tst.js:52:5:52:9 | 1_000 |
| tst.js:53:1:53:13 | x = 1_000_123 |
| tst.js:53:5:53:13 | 1_000_123 |
| tst.js:54:1:54:17 | x = 1_000_000_000 |
| tst.js:54:5:54:17 | 1_000_000_000 |
| tst.js:55:1:55:18 | x = 101_475_938.38 |
| tst.js:55:5:55:18 | 101_475_938.38 |
| tst.js:56:1:56:10 | x = 123_00 |
| tst.js:56:5:56:10 | 123_00 |
| tst.js:57:1:57:10 | x = 12_300 |
| tst.js:57:5:57:10 | 12_300 |
| tst.js:58:1:58:12 | x = 12345_00 |
| tst.js:58:5:58:12 | 12345_00 |
| tst.js:59:1:59:12 | x = 123_4500 |
| tst.js:59:5:59:12 | 123_4500 |
| tst.js:60:1:60:13 | x = 1_234_500 |
| tst.js:60:5:60:13 | 1_234_500 |
| tst.js:61:1:61:10 | x = 1e1_00 |
| tst.js:61:5:61:10 | 1e1_00 |
| tst.js:62:1:62:14 | x = 0xaa_bb_cc |
| tst.js:62:5:62:14 | 0xaa_bb_cc |

View File

@@ -1,87 +1,3 @@
test_AttributeDefinition
| event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); |
| tst.html:3:6:3:30 | href=https://semmle.com |
| tst.html:3:32:3:46 | target=_blank |
| tst.js:2:22:2:37 | target: "_blank" |
| tst.js:3:11:3:66 | $("<a/> ... e.com") |
| tst.js:4:3:4:27 | a.attr( ... pener") |
| tst.js:6:5:6:24 | "data-bind": "stuff" |
| tst.js:8:3:8:29 | a.prop( ... errer") |
| tst.js:10:5:10:29 | "data-b ... rstuff" |
| tst.js:12:3:12:41 | $.attr( ... errer") |
| tst.js:13:3:13:28 | $.prop( ... d", "") |
| tst.jsx:4:14:4:38 | href="h ... le.com" |
| tst.jsx:4:40:4:48 | rel={rel} |
| tst.jsx:4:50:4:64 | {...otherAttrs} |
test_ElementDefinition_getAttribute
| event-handler-receiver.html:4:3:4:58 | <button>...</> | 0 | event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); |
| tst.html:3:3:3:57 | <a>...</> | 0 | tst.html:3:6:3:30 | href=https://semmle.com |
| tst.html:3:3:3:57 | <a>...</> | 1 | tst.html:3:32:3:46 | target=_blank |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | 0 | tst.jsx:4:14:4:38 | href="h ... le.com" |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | 1 | tst.jsx:4:40:4:48 | rel={rel} |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | 2 | tst.jsx:4:50:4:64 | {...otherAttrs} |
test_ElementDefinition_getRoot
| event-handler-receiver.html:1:1:6:7 | <html>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| event-handler-receiver.html:2:1:2:13 | <head>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| event-handler-receiver.html:3:1:5:7 | <body>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| event-handler-receiver.html:4:3:4:58 | <button>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| tst.html:1:1:5:7 | <html>...</> | tst.html:1:1:5:7 | <html>...</> |
| tst.html:2:1:4:7 | <body>...</> | tst.html:1:1:5:7 | <html>...</> |
| tst.html:3:3:3:57 | <a>...</> | tst.html:1:1:5:7 | <html>...</> |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | tst.js:3:11:3:31 | $("<a/> ... rAttrs) |
| tst.js:23:5:23:30 | React.c ... ('div') | tst.js:23:5:23:30 | React.c ... ('div') |
| tst.js:24:5:24:55 | React.c ... , null) | tst.js:24:5:24:55 | React.c ... , null) |
| tst.js:27:5:27:14 | factory1() | tst.js:27:5:27:14 | factory1() |
| tst.js:31:20:31:55 | <div>He ... }</div> | tst.js:31:20:31:55 | <div>He ... }</div> |
| tst.js:36:5:36:55 | React.c ... , null) | tst.js:36:5:36:55 | React.c ... , null) |
| tst.js:39:5:39:14 | factory2() | tst.js:39:5:39:14 | factory2() |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | tst.jsx:4:11:4:75 | <a href ... mle</a> |
test_WebStorageWrite
| tst.js:15:22:15:28 | "value" |
| tst.js:16:31:16:37 | "value" |
| tst.js:17:24:17:30 | "value" |
| tst.js:18:33:18:39 | "value" |
test_ElementDefinition_getAttributeByName
| event-handler-receiver.html:4:3:4:58 | <button>...</> | onclick | event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); |
| tst.html:3:3:3:57 | <a>...</> | href | tst.html:3:6:3:30 | href=https://semmle.com |
| tst.html:3:3:3:57 | <a>...</> | target | tst.html:3:32:3:46 | target=_blank |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | data-bind | tst.js:6:5:6:24 | "data-bind": "stuff" |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | data-bind | tst.js:10:5:10:29 | "data-b ... rstuff" |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | data-bind | tst.js:13:3:13:28 | $.prop( ... d", "") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | href | tst.js:3:11:3:66 | $("<a/> ... e.com") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | rel | tst.js:4:3:4:27 | a.attr( ... pener") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | rel | tst.js:8:3:8:29 | a.prop( ... errer") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | rel | tst.js:12:3:12:41 | $.attr( ... errer") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | target | tst.js:2:22:2:37 | target: "_blank" |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | href | tst.jsx:4:14:4:38 | href="h ... le.com" |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | rel | tst.jsx:4:40:4:48 | rel={rel} |
test_AttributeDefinition_getStringValue
| event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); | alert(this.tagName); |
| tst.html:3:6:3:30 | href=https://semmle.com | https://semmle.com |
| tst.html:3:32:3:46 | target=_blank | _blank |
| tst.js:2:22:2:37 | target: "_blank" | _blank |
| tst.js:3:11:3:66 | $("<a/> ... e.com") | https://semmle.com |
| tst.js:4:3:4:27 | a.attr( ... pener") | noopener |
| tst.js:6:5:6:24 | "data-bind": "stuff" | stuff |
| tst.js:8:3:8:29 | a.prop( ... errer") | noreferrer |
| tst.js:10:5:10:29 | "data-b ... rstuff" | otherstuff |
| tst.js:12:3:12:41 | $.attr( ... errer") | noopener noreferrer |
| tst.js:13:3:13:28 | $.prop( ... d", "") | |
| tst.jsx:4:14:4:38 | href="h ... le.com" | https://semmle.com |
test_AttributeDefinition_getName
| event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); | onclick |
| tst.html:3:6:3:30 | href=https://semmle.com | href |
| tst.html:3:32:3:46 | target=_blank | target |
| tst.js:2:22:2:37 | target: "_blank" | target |
| tst.js:3:11:3:66 | $("<a/> ... e.com") | href |
| tst.js:4:3:4:27 | a.attr( ... pener") | rel |
| tst.js:6:5:6:24 | "data-bind": "stuff" | data-bind |
| tst.js:8:3:8:29 | a.prop( ... errer") | rel |
| tst.js:10:5:10:29 | "data-b ... rstuff" | data-bind |
| tst.js:12:3:12:41 | $.attr( ... errer") | rel |
| tst.js:13:3:13:28 | $.prop( ... d", "") | data-bind |
| tst.jsx:4:14:4:38 | href="h ... le.com" | href |
| tst.jsx:4:40:4:48 | rel={rel} | rel |
test_Element
| event-handler-receiver.html:1:1:6:7 | <html>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| event-handler-receiver.html:2:1:2:13 | <head>...</> | event-handler-receiver.html:2:1:2:13 | <head>...</> |
@@ -110,18 +26,11 @@ test_Element
| tst.js:39:5:39:14 | factory2() | tst.js:39:5:39:14 | factory2() |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | tst.jsx:4:11:4:75 | <a href ... mle</a> |
| tst.jsx:5:3:5:3 | a | tst.jsx:4:11:4:75 | <a href ... mle</a> |
test_AttributeDefinition_getValueNode
| tst.js:2:22:2:37 | target: "_blank" | tst.js:2:30:2:37 | "_blank" |
| tst.js:3:11:3:66 | $("<a/> ... e.com") | tst.js:3:46:3:65 | "https://semmle.com" |
| tst.js:4:3:4:27 | a.attr( ... pener") | tst.js:4:17:4:26 | "noopener" |
| tst.js:6:5:6:24 | "data-bind": "stuff" | tst.js:6:18:6:24 | "stuff" |
| tst.js:8:3:8:29 | a.prop( ... errer") | tst.js:8:17:8:28 | "noreferrer" |
| tst.js:10:5:10:29 | "data-b ... rstuff" | tst.js:10:18:10:29 | "otherstuff" |
| tst.js:12:3:12:41 | $.attr( ... errer") | tst.js:12:20:12:40 | "noopen ... ferrer" |
| tst.js:13:3:13:28 | $.prop( ... d", "") | tst.js:13:26:13:27 | "" |
| tst.jsx:4:14:4:38 | href="h ... le.com" | tst.jsx:4:19:4:38 | "https://semmle.com" |
| tst.jsx:4:40:4:48 | rel={rel} | tst.jsx:4:45:4:47 | rel |
| tst.jsx:4:50:4:64 | {...otherAttrs} | tst.jsx:4:50:4:64 | ...otherAttrs |
test_WebStorageWrite
| tst.js:15:22:15:28 | "value" |
| tst.js:16:31:16:37 | "value" |
| tst.js:17:24:17:30 | "value" |
| tst.js:18:33:18:39 | "value" |
test_ElementDefinition
| event-handler-receiver.html:1:1:6:7 | <html>...</> | html |
| event-handler-receiver.html:2:1:2:13 | <head>...</> | head |
@@ -136,3 +45,94 @@ test_ElementDefinition
| tst.js:27:5:27:14 | factory1() | div |
| tst.js:31:20:31:55 | <div>He ... }</div> | div |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | a |
test_AttributeDefinition
| event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); |
| tst.html:3:6:3:30 | href=https://semmle.com |
| tst.html:3:32:3:46 | target=_blank |
| tst.js:2:22:2:37 | target: "_blank" |
| tst.js:3:11:3:66 | $("<a/> ... e.com") |
| tst.js:4:3:4:27 | a.attr( ... pener") |
| tst.js:6:5:6:24 | "data-bind": "stuff" |
| tst.js:8:3:8:29 | a.prop( ... errer") |
| tst.js:10:5:10:29 | "data-b ... rstuff" |
| tst.js:12:3:12:41 | $.attr( ... errer") |
| tst.js:13:3:13:28 | $.prop( ... d", "") |
| tst.jsx:4:14:4:38 | href="h ... le.com" |
| tst.jsx:4:40:4:48 | rel={rel} |
| tst.jsx:4:50:4:64 | {...otherAttrs} |
test_ElementDefinition_getRoot
| event-handler-receiver.html:1:1:6:7 | <html>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| event-handler-receiver.html:2:1:2:13 | <head>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| event-handler-receiver.html:3:1:5:7 | <body>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| event-handler-receiver.html:4:3:4:58 | <button>...</> | event-handler-receiver.html:1:1:6:7 | <html>...</> |
| tst.html:1:1:5:7 | <html>...</> | tst.html:1:1:5:7 | <html>...</> |
| tst.html:2:1:4:7 | <body>...</> | tst.html:1:1:5:7 | <html>...</> |
| tst.html:3:3:3:57 | <a>...</> | tst.html:1:1:5:7 | <html>...</> |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | tst.js:3:11:3:31 | $("<a/> ... rAttrs) |
| tst.js:23:5:23:30 | React.c ... ('div') | tst.js:23:5:23:30 | React.c ... ('div') |
| tst.js:24:5:24:55 | React.c ... , null) | tst.js:24:5:24:55 | React.c ... , null) |
| tst.js:27:5:27:14 | factory1() | tst.js:27:5:27:14 | factory1() |
| tst.js:31:20:31:55 | <div>He ... }</div> | tst.js:31:20:31:55 | <div>He ... }</div> |
| tst.js:36:5:36:55 | React.c ... , null) | tst.js:36:5:36:55 | React.c ... , null) |
| tst.js:39:5:39:14 | factory2() | tst.js:39:5:39:14 | factory2() |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | tst.jsx:4:11:4:75 | <a href ... mle</a> |
test_AttributeDefinition_getName
| event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); | onclick |
| tst.html:3:6:3:30 | href=https://semmle.com | href |
| tst.html:3:32:3:46 | target=_blank | target |
| tst.js:2:22:2:37 | target: "_blank" | target |
| tst.js:3:11:3:66 | $("<a/> ... e.com") | href |
| tst.js:4:3:4:27 | a.attr( ... pener") | rel |
| tst.js:6:5:6:24 | "data-bind": "stuff" | data-bind |
| tst.js:8:3:8:29 | a.prop( ... errer") | rel |
| tst.js:10:5:10:29 | "data-b ... rstuff" | data-bind |
| tst.js:12:3:12:41 | $.attr( ... errer") | rel |
| tst.js:13:3:13:28 | $.prop( ... d", "") | data-bind |
| tst.jsx:4:14:4:38 | href="h ... le.com" | href |
| tst.jsx:4:40:4:48 | rel={rel} | rel |
test_ElementDefinition_getAttribute
| event-handler-receiver.html:4:3:4:58 | <button>...</> | 0 | event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); |
| tst.html:3:3:3:57 | <a>...</> | 0 | tst.html:3:6:3:30 | href=https://semmle.com |
| tst.html:3:3:3:57 | <a>...</> | 1 | tst.html:3:32:3:46 | target=_blank |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | 0 | tst.jsx:4:14:4:38 | href="h ... le.com" |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | 1 | tst.jsx:4:40:4:48 | rel={rel} |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | 2 | tst.jsx:4:50:4:64 | {...otherAttrs} |
test_AttributeDefinition_getValueNode
| tst.js:2:22:2:37 | target: "_blank" | tst.js:2:30:2:37 | "_blank" |
| tst.js:3:11:3:66 | $("<a/> ... e.com") | tst.js:3:46:3:65 | "https://semmle.com" |
| tst.js:4:3:4:27 | a.attr( ... pener") | tst.js:4:17:4:26 | "noopener" |
| tst.js:6:5:6:24 | "data-bind": "stuff" | tst.js:6:18:6:24 | "stuff" |
| tst.js:8:3:8:29 | a.prop( ... errer") | tst.js:8:17:8:28 | "noreferrer" |
| tst.js:10:5:10:29 | "data-b ... rstuff" | tst.js:10:18:10:29 | "otherstuff" |
| tst.js:12:3:12:41 | $.attr( ... errer") | tst.js:12:20:12:40 | "noopen ... ferrer" |
| tst.js:13:3:13:28 | $.prop( ... d", "") | tst.js:13:26:13:27 | "" |
| tst.jsx:4:14:4:38 | href="h ... le.com" | tst.jsx:4:19:4:38 | "https://semmle.com" |
| tst.jsx:4:40:4:48 | rel={rel} | tst.jsx:4:45:4:47 | rel |
| tst.jsx:4:50:4:64 | {...otherAttrs} | tst.jsx:4:50:4:64 | ...otherAttrs |
test_AttributeDefinition_getStringValue
| event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); | alert(this.tagName); |
| tst.html:3:6:3:30 | href=https://semmle.com | https://semmle.com |
| tst.html:3:32:3:46 | target=_blank | _blank |
| tst.js:2:22:2:37 | target: "_blank" | _blank |
| tst.js:3:11:3:66 | $("<a/> ... e.com") | https://semmle.com |
| tst.js:4:3:4:27 | a.attr( ... pener") | noopener |
| tst.js:6:5:6:24 | "data-bind": "stuff" | stuff |
| tst.js:8:3:8:29 | a.prop( ... errer") | noreferrer |
| tst.js:10:5:10:29 | "data-b ... rstuff" | otherstuff |
| tst.js:12:3:12:41 | $.attr( ... errer") | noopener noreferrer |
| tst.js:13:3:13:28 | $.prop( ... d", "") | |
| tst.jsx:4:14:4:38 | href="h ... le.com" | https://semmle.com |
test_ElementDefinition_getAttributeByName
| event-handler-receiver.html:4:3:4:58 | <button>...</> | onclick | event-handler-receiver.html:4:11:4:40 | onclick=alert(this.tagName); |
| tst.html:3:3:3:57 | <a>...</> | href | tst.html:3:6:3:30 | href=https://semmle.com |
| tst.html:3:3:3:57 | <a>...</> | target | tst.html:3:32:3:46 | target=_blank |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | data-bind | tst.js:6:5:6:24 | "data-bind": "stuff" |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | data-bind | tst.js:10:5:10:29 | "data-b ... rstuff" |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | data-bind | tst.js:13:3:13:28 | $.prop( ... d", "") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | href | tst.js:3:11:3:66 | $("<a/> ... e.com") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | rel | tst.js:4:3:4:27 | a.attr( ... pener") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | rel | tst.js:8:3:8:29 | a.prop( ... errer") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | rel | tst.js:12:3:12:41 | $.attr( ... errer") |
| tst.js:3:11:3:31 | $("<a/> ... rAttrs) | target | tst.js:2:22:2:37 | target: "_blank" |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | href | tst.jsx:4:14:4:38 | href="h ... le.com" |
| tst.jsx:4:11:4:75 | <a href ... mle</a> | rel | tst.jsx:4:40:4:48 | rel={rel} |

View File

@@ -1022,7 +1022,6 @@ flowStep
| tst.js:4:9:4:12 | "hi" | tst.js:4:5:4:12 | y |
| tst.js:9:2:9:2 | x | tst.js:9:1:9:3 | (x) |
| tst.js:10:4:10:4 | y | tst.js:10:1:10:4 | x, y |
| tst.js:11:1:11:1 | x | tst.js:11:1:11:6 | x && y |
| tst.js:11:1:11:1 | x | tst.js:12:1:12:1 | x |
| tst.js:11:1:11:1 | x | tst.js:12:1:12:1 | x |
| tst.js:11:6:11:6 | y | tst.js:11:1:11:6 | x && y |

View File

@@ -1,5 +1,4 @@
import javascript
import semmle.javascript.dependencies.Dependencies
import semmle.javascript.dependencies.SemVer
class SampleVersionSink extends DataFlow::Node {

View File

@@ -1,4 +1,4 @@
import javascript
from KnownDirective d
from Directive::KnownDirective d
select d, d.getDirectiveText()

View File

@@ -0,0 +1,8 @@
testFailures
ambiguousPreferredPredecessor
| pack2/lib.js:1:1:3:1 | def moduleImport("pack2").getMember("exports").getMember("lib").getMember("LibClass").getInstance() |
| pack2/lib.js:8:22:8:34 | def moduleImport("pack2").getMember("exports").getMember("lib").getMember("LibClass").getMember("foo") |
| pack2/main.js:1:1:3:1 | def moduleImport("pack2").getMember("exports").getMember("MainClass").getInstance() |
ambiguousSinkName
ambiguousFunctionName
failures

View File

@@ -0,0 +1,40 @@
import javascript
import semmle.javascript.RestrictedLocations
import semmle.javascript.Lines
import semmle.javascript.endpoints.EndpointNaming as EndpointNaming
import testUtilities.InlineExpectationsTest
import EndpointNaming::Debug
private predicate isIgnored(DataFlow::FunctionNode function) {
function.getFunction() = any(ConstructorDeclaration decl | decl.isSynthetic()).getBody()
}
module TestConfig implements TestSig {
string getARelevantTag() { result = ["name", "alias"] }
predicate hasActualResult(Location location, string element, string tag, string value) {
element = "" and
tag = "name" and
exists(DataFlow::SourceNode function, string package, string name |
EndpointNaming::functionHasPrimaryName(function, package, name) and
not isIgnored(function) and
location = function.getAstNode().getLocation() and
value = EndpointNaming::renderName(package, name)
)
or
element = "" and
tag = "alias" and
exists(
API::Node aliasDef, string primaryPackage, string primaryName, string aliasPackage,
string aliasName
|
EndpointNaming::aliasDefinition(aliasPackage, aliasName, primaryPackage, primaryName, aliasDef) and
value =
EndpointNaming::renderName(aliasPackage, aliasName) + "==" +
EndpointNaming::renderName(primaryPackage, primaryName) and
location = aliasDef.asSink().asExpr().getLocation()
)
}
}
import MakeTest<TestConfig>

View File

@@ -0,0 +1,21 @@
export class PublicClass {} // $ name=(pack1).PublicClass
class PrivateClass {}
export const ExportedConst = class ExportedConstClass {} // $ name=(pack1).ExportedConst
class ClassWithEscapingInstance {
m() {} // $ name=(pack1).ClassWithEscapingInstance.prototype.m
}
export function getEscapingInstance() {
return new ClassWithEscapingInstance();
} // $ name=(pack1).getEscapingInstance
export function publicFunction() {} // $ name=(pack1).publicFunction
// Escapes into an upstream library, but is not exposed downstream
class InternalClass {
m() {}
}
require('foo').bar(new InternalClass());

View File

@@ -0,0 +1,4 @@
{
"name": "pack1",
"main": "./main.js"
}

View File

@@ -0,0 +1 @@
export default class FooClass {} // $ name=(pack10).Foo

View File

@@ -0,0 +1,3 @@
import { default as Foo } from "./foo";
export { Foo }

View File

@@ -0,0 +1,4 @@
{
"name": "pack10",
"main": "./index.js"
}

View File

@@ -0,0 +1,59 @@
const f1 = {
m() {} // $ name=(pack11).C1.publicField.really.long.name.m
};
export class C1 {
private static privateField = f1;
public static publicField = {
really: {
long: {
name: f1
}
}
}
} // $ name=(pack11).C1
const f2 = {
m() {} // $ name=(pack11).C2.publicField.really.long.name.m
}
export class C2 {
static #privateField = f2;
static publicField = {
really: {
long: {
name: f2
}
}
}
} // $ name=(pack11).C2
function f3() {} // $ name=(pack11).C3.publicField.really.long.name
export class C3 {
private static privateField = f3;
public static publicField = {
really: {
long: {
name: f3
}
}
}
} // $ name=(pack11).C3
const f4 = {
m() {} // $ name=(pack11).C4.really.long.name.m
};
export const C4 = {
[Math.random()]: f4,
really: {
long: {
name: f4
}
}
}

View File

@@ -0,0 +1,4 @@
{
"name": "pack11",
"main": "./index.js"
}

View File

@@ -0,0 +1,10 @@
function wrap(fn) {
return x => fn(x);
}
function f() {}
export const f1 = wrap(f); // $ name=(pack12).f1
export const f2 = wrap(f); // $ name=(pack12).f2
function g() {}
export const g1 = wrap(g); // $ name=(pack12).g1

View File

@@ -0,0 +1,4 @@
{
"name": "pack12",
"main": "./index.js"
}

View File

@@ -0,0 +1,8 @@
class AmbiguousClass {
instanceMethod(foo) {} // $ name=(pack2).lib.LibClass.prototype.instanceMethod
} // $ name=(pack2).lib.LibClass
export default AmbiguousClass; // $ alias=(pack2).lib.default==(pack2).lib.LibClass
export { AmbiguousClass as LibClass }
AmbiguousClass.foo = function() {} // $ name=(pack2).lib.LibClass.foo

View File

@@ -0,0 +1,9 @@
class AmbiguousClass {
instanceMethod() {} // $ name=(pack2).MainClass.prototype.instanceMethod
} // $ name=(pack2).MainClass
export default AmbiguousClass; // $ alias=(pack2).default==(pack2).MainClass
export { AmbiguousClass as MainClass }
import * as lib from "./lib";
export { lib }

View File

@@ -0,0 +1,4 @@
{
"name": "pack2",
"main": "./main.js"
}

View File

@@ -0,0 +1 @@
export default function(x,y,z) {} // $ name=(pack3).libFunction alias=(pack3).libFunction.default==(pack3).libFunction

View File

@@ -0,0 +1,7 @@
function ambiguousFunction(x, y, z) {} // $ name=(pack3).namedFunction
export default ambiguousFunction; // $ alias=(pack3).default==(pack3).namedFunction
export { ambiguousFunction as namedFunction };
import libFunction from "./lib";
export { libFunction };

View File

@@ -0,0 +1,4 @@
{
"name": "pack3",
"main": "./main.js"
}

View File

@@ -0,0 +1 @@
export default class C {} // $ name=(pack4)

View File

@@ -0,0 +1,4 @@
{
"name": "pack4",
"main": "./index.js"
}

View File

@@ -0,0 +1,4 @@
{
"name": "pack5",
"main": "./dist/index.js"
}

View File

@@ -0,0 +1 @@
export default class C {} // $ name=(pack5)

View File

@@ -0,0 +1,6 @@
class C {
instanceMethod() {} // $ name=(pack6).instanceMethod
static staticMethod() {} // not accessible
}
export default new C();

View File

@@ -0,0 +1,4 @@
{
"name": "pack6",
"main": "./index.js"
}

View File

@@ -0,0 +1,6 @@
export class D {} // $ name=(pack7).D
// In this case we are forced to include ".default" to avoid ambiguity with class D above.
export default {
D: class {} // $ name=(pack7).default.D
};

View File

@@ -0,0 +1,4 @@
{
"name": "pack7",
"main": "./index.js"
}

View File

@@ -0,0 +1,5 @@
class Foo {} // $ name=(pack8).Foo
module.exports = Foo;
module.exports.default = Foo; // $ alias=(pack8).Foo.default==(pack8).Foo
module.exports.Foo = Foo; // $ alias=(pack8).Foo.Foo==(pack8).Foo

View File

@@ -0,0 +1,5 @@
class Main {} // $ name=(pack8)
Main.Foo = require('./foo');
module.exports = Main;

View File

@@ -0,0 +1,4 @@
{
"name": "pack8",
"main": "./index.js"
}

View File

@@ -0,0 +1 @@
export class Foo {}

View File

@@ -0,0 +1,9 @@
// Only the type is exposed. For the time being we do not consider type-only declarations or .d.ts files
// when naming classes.
export type { Foo } from "./foo";
import * as foo from "./foo";
export function expose() {
return new foo.Foo(); // expose an instance of Foo but not the class
} // $ name=(pack9).expose

View File

@@ -0,0 +1,4 @@
{
"name": "pack9",
"main": "./index.js"
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,53 @@
test_getVariable
test_getId
| defaultargs.js:1:1:1:24 | functio ... +19) {} | defaultargs.js:1:10:1:10 | f | f |
| generators.js:1:1:4:1 | functio ... i++;\\n} | generators.js:1:11:1:13 | foo | foo |
| generators.js:6:2:6:19 | function* bar() {} | generators.js:6:12:6:14 | bar | bar |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | restparms.js:1:10:1:10 | r | r |
| tst.js:1:1:1:15 | function A() {} | tst.js:1:10:1:10 | A | A |
| tst.js:2:1:2:16 | function B(x) {} | tst.js:2:10:2:10 | B | B |
| tst.js:3:1:3:19 | function C(x, y) {} | tst.js:3:10:3:10 | C | C |
| tst.js:7:9:7:23 | function h() {} | tst.js:7:18:7:18 | h | h |
| tst.js:9:1:9:24 | functio ... nts) {} | tst.js:9:10:9:10 | k | k |
| tst.js:10:1:10:31 | functio ... ents; } | tst.js:10:10:10:10 | l | l |
| tst.js:11:1:11:35 | functio ... ts; } } | tst.js:11:10:11:10 | m | m |
| tst.js:12:1:12:44 | functio ... s) {} } | tst.js:12:10:12:10 | n | n |
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:10:14:10 | p | p |
test_getBody
| arrowfns.js:1:24:1:36 | s => s.length | arrowfns.js:1:29:1:36 | s.length |
| arrowfns.js:2:13:2:23 | () => ++cnt | arrowfns.js:2:19:2:23 | ++cnt |
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | arrowfns.js:3:18:3:41 | { alert ... "); ; } |
| defaultargs.js:1:1:1:24 | functio ... +19) {} | defaultargs.js:1:23:1:24 | {} |
| exprclosures.js:1:7:1:21 | function(x) x+1 | exprclosures.js:1:19:1:21 | x+1 |
| generators.js:1:1:4:1 | functio ... i++;\\n} | generators.js:1:16:4:1 | {\\n for ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} | generators.js:6:18:6:19 | {} |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | restparms.js:1:22:2:1 | {\\n} |
| tst.js:1:1:1:15 | function A() {} | tst.js:1:14:1:15 | {} |
| tst.js:2:1:2:16 | function B(x) {} | tst.js:2:15:2:16 | {} |
| tst.js:3:1:3:19 | function C(x, y) {} | tst.js:3:18:3:19 | {} |
| tst.js:4:9:4:21 | function() {} | tst.js:4:20:4:21 | {} |
| tst.js:5:2:5:15 | function(x) {} | tst.js:5:14:5:15 | {} |
| tst.js:6:2:6:18 | function(x, y) {} | tst.js:6:17:6:18 | {} |
| tst.js:7:9:7:23 | function h() {} | tst.js:7:22:7:23 | {} |
| tst.js:9:1:9:24 | functio ... nts) {} | tst.js:9:23:9:24 | {} |
| tst.js:10:1:10:31 | functio ... ents; } | tst.js:10:14:10:31 | { var arguments; } |
| tst.js:11:1:11:35 | functio ... ts; } } | tst.js:11:14:11:35 | { { var ... ts; } } |
| tst.js:12:1:12:44 | functio ... s) {} } | tst.js:12:14:12:44 | { try { ... s) {} } |
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:14:14:37 | { retur ... s[0]; } |
test_Function
| arrowfns.js:1:24:1:36 | s => s.length |
| arrowfns.js:2:13:2:23 | () => ++cnt |
| arrowfns.js:3:12:3:41 | () => { ... "); ; } |
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
| exprclosures.js:1:7:1:21 | function(x) x+1 |
| generators.js:1:1:4:1 | functio ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
| tst.js:1:1:1:15 | function A() {} |
| tst.js:2:1:2:16 | function B(x) {} |
| tst.js:3:1:3:19 | function C(x, y) {} |
| tst.js:4:9:4:21 | function() {} |
| tst.js:5:2:5:15 | function(x) {} |
| tst.js:6:2:6:18 | function(x, y) {} |
| tst.js:7:9:7:23 | function h() {} |
| tst.js:9:1:9:24 | functio ... nts) {} |
| tst.js:10:1:10:31 | functio ... ents; } |
@@ -33,6 +75,33 @@ test_getScope
| tst.js:11:1:11:35 | functio ... ts; } } |
| tst.js:12:1:12:44 | functio ... s) {} } |
| tst.js:14:1:14:37 | functio ... s[0]; } |
test_ReturnStmt
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:16:14:35 | return arguments[0]; |
test_getBodyStmt
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | 0 | arrowfns.js:3:20:3:37 | alert("Wake up!"); |
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | 1 | arrowfns.js:3:39:3:39 | ; |
| generators.js:1:1:4:1 | functio ... i++;\\n} | 0 | generators.js:2:3:3:14 | for (va ... ld i++; |
| tst.js:10:1:10:31 | functio ... ents; } | 0 | tst.js:10:16:10:29 | var arguments; |
| tst.js:11:1:11:35 | functio ... ts; } } | 0 | tst.js:11:16:11:33 | { var arguments; } |
| tst.js:12:1:12:44 | functio ... s) {} } | 0 | tst.js:12:16:12:42 | try { } ... nts) {} |
| tst.js:14:1:14:37 | functio ... s[0]; } | 0 | tst.js:14:16:14:35 | return arguments[0]; |
test_getVariable
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
| generators.js:1:1:4:1 | functio ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
| tst.js:1:1:1:15 | function A() {} |
| tst.js:2:1:2:16 | function B(x) {} |
| tst.js:3:1:3:19 | function C(x, y) {} |
| tst.js:7:9:7:23 | function h() {} |
| tst.js:9:1:9:24 | functio ... nts) {} |
| tst.js:10:1:10:31 | functio ... ents; } |
| tst.js:11:1:11:35 | functio ... ts; } } |
| tst.js:12:1:12:44 | functio ... s) {} } |
| tst.js:14:1:14:37 | functio ... s[0]; } |
test_isGenerator
| generators.js:1:1:4:1 | functio ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} |
test_getParameter
| arrowfns.js:1:24:1:36 | s => s.length | 0 | arrowfns.js:1:24:1:24 | s |
| defaultargs.js:1:1:1:24 | functio ... +19) {} | 0 | defaultargs.js:1:12:1:12 | x |
@@ -47,102 +116,8 @@ test_getParameter
| tst.js:6:2:6:18 | function(x, y) {} | 0 | tst.js:6:11:6:11 | x |
| tst.js:6:2:6:18 | function(x, y) {} | 1 | tst.js:6:14:6:14 | y |
| tst.js:9:1:9:24 | functio ... nts) {} | 0 | tst.js:9:12:9:20 | arguments |
test_ReturnedExpression
| arrowfns.js:1:24:1:36 | s => s.length | arrowfns.js:1:29:1:36 | s.length |
| arrowfns.js:2:13:2:23 | () => ++cnt | arrowfns.js:2:19:2:23 | ++cnt |
| exprclosures.js:1:7:1:21 | function(x) x+1 | exprclosures.js:1:19:1:21 | x+1 |
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:23:14:34 | arguments[0] |
test_getDefaultArguments
| defaultargs.js:1:15:1:15 | y | defaultargs.js:1:17:1:20 | x+19 |
test_Function
| arrowfns.js:1:24:1:36 | s => s.length |
| arrowfns.js:2:13:2:23 | () => ++cnt |
| arrowfns.js:3:12:3:41 | () => { ... "); ; } |
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
| exprclosures.js:1:7:1:21 | function(x) x+1 |
| generators.js:1:1:4:1 | functio ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
| tst.js:1:1:1:15 | function A() {} |
| tst.js:2:1:2:16 | function B(x) {} |
| tst.js:3:1:3:19 | function C(x, y) {} |
| tst.js:4:9:4:21 | function() {} |
| tst.js:5:2:5:15 | function(x) {} |
| tst.js:6:2:6:18 | function(x, y) {} |
| tst.js:7:9:7:23 | function h() {} |
| tst.js:9:1:9:24 | functio ... nts) {} |
| tst.js:10:1:10:31 | functio ... ents; } |
| tst.js:11:1:11:35 | functio ... ts; } } |
| tst.js:12:1:12:44 | functio ... s) {} } |
| tst.js:14:1:14:37 | functio ... s[0]; } |
test_getBody
| arrowfns.js:1:24:1:36 | s => s.length | arrowfns.js:1:29:1:36 | s.length |
| arrowfns.js:2:13:2:23 | () => ++cnt | arrowfns.js:2:19:2:23 | ++cnt |
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | arrowfns.js:3:18:3:41 | { alert ... "); ; } |
| defaultargs.js:1:1:1:24 | functio ... +19) {} | defaultargs.js:1:23:1:24 | {} |
| exprclosures.js:1:7:1:21 | function(x) x+1 | exprclosures.js:1:19:1:21 | x+1 |
| generators.js:1:1:4:1 | functio ... i++;\\n} | generators.js:1:16:4:1 | {\\n for ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} | generators.js:6:18:6:19 | {} |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | restparms.js:1:22:2:1 | {\\n} |
| tst.js:1:1:1:15 | function A() {} | tst.js:1:14:1:15 | {} |
| tst.js:2:1:2:16 | function B(x) {} | tst.js:2:15:2:16 | {} |
| tst.js:3:1:3:19 | function C(x, y) {} | tst.js:3:18:3:19 | {} |
| tst.js:4:9:4:21 | function() {} | tst.js:4:20:4:21 | {} |
| tst.js:5:2:5:15 | function(x) {} | tst.js:5:14:5:15 | {} |
| tst.js:6:2:6:18 | function(x, y) {} | tst.js:6:17:6:18 | {} |
| tst.js:7:9:7:23 | function h() {} | tst.js:7:22:7:23 | {} |
| tst.js:9:1:9:24 | functio ... nts) {} | tst.js:9:23:9:24 | {} |
| tst.js:10:1:10:31 | functio ... ents; } | tst.js:10:14:10:31 | { var arguments; } |
| tst.js:11:1:11:35 | functio ... ts; } } | tst.js:11:14:11:35 | { { var ... ts; } } |
| tst.js:12:1:12:44 | functio ... s) {} } | tst.js:12:14:12:44 | { try { ... s) {} } |
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:14:14:37 | { retur ... s[0]; } |
test_getId
| defaultargs.js:1:1:1:24 | functio ... +19) {} | defaultargs.js:1:10:1:10 | f | f |
| generators.js:1:1:4:1 | functio ... i++;\\n} | generators.js:1:11:1:13 | foo | foo |
| generators.js:6:2:6:19 | function* bar() {} | generators.js:6:12:6:14 | bar | bar |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} | restparms.js:1:10:1:10 | r | r |
| tst.js:1:1:1:15 | function A() {} | tst.js:1:10:1:10 | A | A |
| tst.js:2:1:2:16 | function B(x) {} | tst.js:2:10:2:10 | B | B |
| tst.js:3:1:3:19 | function C(x, y) {} | tst.js:3:10:3:10 | C | C |
| tst.js:7:9:7:23 | function h() {} | tst.js:7:18:7:18 | h | h |
| tst.js:9:1:9:24 | functio ... nts) {} | tst.js:9:10:9:10 | k | k |
| tst.js:10:1:10:31 | functio ... ents; } | tst.js:10:10:10:10 | l | l |
| tst.js:11:1:11:35 | functio ... ts; } } | tst.js:11:10:11:10 | m | m |
| tst.js:12:1:12:44 | functio ... s) {} } | tst.js:12:10:12:10 | n | n |
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:10:14:10 | p | p |
test_hasRestParameter
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
test_getArgumentsVariable
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
| exprclosures.js:1:7:1:21 | function(x) x+1 |
| generators.js:1:1:4:1 | functio ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
| tst.js:1:1:1:15 | function A() {} |
| tst.js:2:1:2:16 | function B(x) {} |
| tst.js:3:1:3:19 | function C(x, y) {} |
| tst.js:4:9:4:21 | function() {} |
| tst.js:5:2:5:15 | function(x) {} |
| tst.js:6:2:6:18 | function(x, y) {} |
| tst.js:7:9:7:23 | function h() {} |
| tst.js:9:1:9:24 | functio ... nts) {} |
| tst.js:10:1:10:31 | functio ... ents; } |
| tst.js:11:1:11:35 | functio ... ts; } } |
| tst.js:12:1:12:44 | functio ... s) {} } |
| tst.js:14:1:14:37 | functio ... s[0]; } |
test_getBodyStmt
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | 0 | arrowfns.js:3:20:3:37 | alert("Wake up!"); |
| arrowfns.js:3:12:3:41 | () => { ... "); ; } | 1 | arrowfns.js:3:39:3:39 | ; |
| generators.js:1:1:4:1 | functio ... i++;\\n} | 0 | generators.js:2:3:3:14 | for (va ... ld i++; |
| tst.js:10:1:10:31 | functio ... ents; } | 0 | tst.js:10:16:10:29 | var arguments; |
| tst.js:11:1:11:35 | functio ... ts; } } | 0 | tst.js:11:16:11:33 | { var arguments; } |
| tst.js:12:1:12:44 | functio ... s) {} } | 0 | tst.js:12:16:12:42 | try { } ... nts) {} |
| tst.js:14:1:14:37 | functio ... s[0]; } | 0 | tst.js:14:16:14:35 | return arguments[0]; |
test_isGenerator
| generators.js:1:1:4:1 | functio ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} |
test_usesArgumentsObject
| tst.js:14:1:14:37 | functio ... s[0]; } |
test_isRestParameter
| restparms.js:1:18:1:19 | ys |
test_getEnclosingStmt
| arrowfns.js:1:24:1:36 | s => s.length | arrowfns.js:1:1:1:38 | ["a", " ... ength); |
| arrowfns.js:2:13:2:23 | () => ++cnt | arrowfns.js:2:1:2:31 | setInte ... 1000); |
@@ -164,7 +139,32 @@ test_getEnclosingStmt
| tst.js:11:1:11:35 | functio ... ts; } } | tst.js:11:1:11:35 | functio ... ts; } } |
| tst.js:12:1:12:44 | functio ... s) {} } | tst.js:12:1:12:44 | functio ... s) {} } |
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:1:14:37 | functio ... s[0]; } |
test_isRestParameter
| restparms.js:1:18:1:19 | ys |
test_ReturnStmt
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:16:14:35 | return arguments[0]; |
test_hasRestParameter
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
test_ReturnedExpression
| arrowfns.js:1:24:1:36 | s => s.length | arrowfns.js:1:29:1:36 | s.length |
| arrowfns.js:2:13:2:23 | () => ++cnt | arrowfns.js:2:19:2:23 | ++cnt |
| exprclosures.js:1:7:1:21 | function(x) x+1 | exprclosures.js:1:19:1:21 | x+1 |
| tst.js:14:1:14:37 | functio ... s[0]; } | tst.js:14:23:14:34 | arguments[0] |
test_getDefaultArguments
| defaultargs.js:1:15:1:15 | y | defaultargs.js:1:17:1:20 | x+19 |
test_usesArgumentsObject
| tst.js:14:1:14:37 | functio ... s[0]; } |
test_getArgumentsVariable
| defaultargs.js:1:1:1:24 | functio ... +19) {} |
| exprclosures.js:1:7:1:21 | function(x) x+1 |
| generators.js:1:1:4:1 | functio ... i++;\\n} |
| generators.js:6:2:6:19 | function* bar() {} |
| restparms.js:1:1:2:1 | functio ... ys) {\\n} |
| tst.js:1:1:1:15 | function A() {} |
| tst.js:2:1:2:16 | function B(x) {} |
| tst.js:3:1:3:19 | function C(x, y) {} |
| tst.js:4:9:4:21 | function() {} |
| tst.js:5:2:5:15 | function(x) {} |
| tst.js:6:2:6:18 | function(x, y) {} |
| tst.js:7:9:7:23 | function h() {} |
| tst.js:9:1:9:24 | functio ... nts) {} |
| tst.js:10:1:10:31 | functio ... ents; } |
| tst.js:11:1:11:35 | functio ... ts; } } |
| tst.js:12:1:12:44 | functio ... s) {} } |
| tst.js:14:1:14:37 | functio ... s[0]; } |

View File

@@ -22,10 +22,7 @@ class TestDataFlowConfiguration extends DataFlow::Configuration {
f.getName().matches("%noReturnTracking%") and
node = f.getAReturnedExpr().flow()
)
}
override predicate isBarrierEdge(DataFlow::Node src, DataFlow::Node snk) {
src = src and
snk.asExpr().(PropAccess).getPropertyName() = "notTracked"
or
node.asExpr().(PropAccess).getPropertyName() = "notTracked"
}
}

View File

@@ -61,11 +61,8 @@ class TestTaintTrackingConfiguration extends TaintTracking::Configuration {
f.getName().matches("%noReturnTracking%") and
node = f.getAReturnedExpr().flow()
)
}
override predicate isSanitizerEdge(DataFlow::Node src, DataFlow::Node snk) {
src = src and
snk.asExpr().(PropAccess).getPropertyName() = "notTracked"
or
node.asExpr().(PropAccess).getPropertyName() = "notTracked"
}
}
@@ -99,11 +96,8 @@ class GermanFlowConfig extends DataFlow::Configuration {
f.getName().matches("%noReturnTracking%") and
node = f.getAReturnedExpr().flow()
)
}
override predicate isBarrierEdge(DataFlow::Node src, DataFlow::Node snk) {
src = src and
snk.asExpr().(PropAccess).getPropertyName() = "notTracked"
or
node.asExpr().(PropAccess).getPropertyName() = "notTracked"
}
}

View File

@@ -1,3 +1,421 @@
test_JSDoc
| tst.js:5:1:5:13 | /** @const */ | | tst.js:5:1:5:13 | /** @const */ |
| tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ | My namespace's favorite kind of beer. | tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ |
| tst.js:14:1:14:13 | /** @const */ | | tst.js:14:1:14:13 | /** @const */ |
| tst.js:16:1:19:3 | /**\\n * ... tor\\n */ | A rectangle. | tst.js:16:1:19:3 | /**\\n * ... tor\\n */ |
| tst.js:23:1:23:24 | /** @de ... ean} */ | | tst.js:23:1:23:24 | /** @de ... ean} */ |
| tst.js:26:1:26:24 | /** @de ... ean} */ | | tst.js:26:1:26:24 | /** @de ... ean} */ |
| tst.js:29:1:35:3 | /**\\n * ... ().\\n */ | Determines whether a node is a field. | tst.js:29:1:35:3 | /**\\n * ... ().\\n */ |
| tst.js:39:1:42:3 | /**\\n * ... ict\\n */ | | tst.js:39:1:42:3 | /**\\n * ... ict\\n */ |
| tst.js:48:12:48:23 | /** @dict */ | | tst.js:48:12:48:23 | /** @dict */ |
| tst.js:51:1:54:3 | /**\\n * ... er}\\n */ | Enum for tri-state values. | tst.js:51:1:54:3 | /**\\n * ... er}\\n */ |
| tst.js:61:1:61:14 | /** @export */ | | tst.js:61:1:61:14 | /** @export */ |
| tst.js:65:1:69:3 | /**\\n * ... st}\\n */ | Immutable empty node list. | tst.js:65:1:69:3 | /**\\n * ... st}\\n */ |
| tst.js:73:1:77:3 | /**\\n * ... tor\\n */ | A class that cannot be extended. | tst.js:73:1:77:3 | /**\\n * ... tor\\n */ |
| tst.js:80:1:83:3 | /**\\n * ... nal\\n */ | A method that cannot be overridden. | tst.js:80:1:83:3 | /**\\n * ... nal\\n */ |
| tst.js:86:1:89:3 | /**\\n * ... ace\\n */ | A shape. | tst.js:86:1:89:3 | /**\\n * ... ace\\n */ |
| tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ | | tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ |
| tst.js:101:1:103:17 | /**\\n * ... tDoc */ | | tst.js:101:1:103:17 | /**\\n * ... tDoc */ |
| tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ | A polygon. | tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ |
| tst.js:117:9:117:40 | /** @le ... ype} */ | | tst.js:117:9:117:40 | /** @le ... ype} */ |
| tst.js:121:1:126:3 | /**\\n * ... sh:\\n */ | | tst.js:121:1:126:3 | /**\\n * ... sh:\\n */ |
| tst.js:128:1:128:21 | /** @no ... ects */ | | tst.js:128:1:128:21 | /** @no ... ects */ |
| tst.js:131:1:136:3 | /**\\n * ... age\\n */ | Returns the window object the foreign document resides in. | tst.js:131:1:136:3 | /**\\n * ... age\\n */ |
| tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ | Queries a Baz for items. | tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ |
| tst.js:149:14:149:26 | /** number */ | number | tst.js:149:14:149:26 | /** number */ |
| tst.js:149:31:149:43 | /** number */ | number | tst.js:149:31:149:43 | /** number */ |
| tst.js:153:1:157:3 | /**\\n * ... ate\\n */ | Handlers that are listening to this logger. | tst.js:153:1:157:3 | /**\\n * ... ate\\n */ |
| tst.js:160:1:165:3 | /**\\n * ... ted\\n */ | Sets the component's root element to the given element.\nConsidered protected and final. | tst.js:160:1:165:3 | /**\\n * ... ted\\n */ |
| tst.js:169:1:172:3 | /**\\n * ... ID.\\n */ | Returns the ID of the last item. | tst.js:169:1:172:3 | /**\\n * ... ID.\\n */ |
| tst.js:177:10:177:22 | /** number */ | number | tst.js:177:10:177:22 | /** number */ |
| tst.js:179:1:182:3 | /**\\n * ... uct\\n */ | | tst.js:179:1:182:3 | /**\\n * ... uct\\n */ |
| tst.js:192:12:192:25 | /** @struct */ | | tst.js:192:12:192:25 | /** @struct */ |
| tst.js:196:9:200:11 | /**\\n ... */ | Returns the roster widget element. | tst.js:196:9:200:11 | /**\\n ... */ |
| tst.js:205:1:207:3 | /**\\n * ... on}\\n */ | | tst.js:205:1:207:3 | /**\\n * ... on}\\n */ |
| tst.js:210:1:213:3 | /**\\n * ... ng}\\n */ | The message hex ID. | tst.js:210:1:213:3 | /**\\n * ... ng}\\n */ |
| tst.js:216:1:216:33 | /** @ty ... er)} */ | | tst.js:216:1:216:33 | /** @ty ... er)} */ |
| tst.js:219:1:219:55 | /** @pa ... ing. */ | | tst.js:219:1:219:55 | /** @pa ... ing. */ |
| tst.js:223:1:223:40 | /** @ty ... ct}} */ | | tst.js:223:1:223:40 | /** @ty ... ct}} */ |
| tst.js:226:1:226:22 | /** @ty ... er?} */ | | tst.js:226:1:226:22 | /** @ty ... er?} */ |
| tst.js:229:1:229:22 | /** @ty ... ect} */ | | tst.js:229:1:229:22 | /** @ty ... ect} */ |
| tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ |
| tst.js:246:1:249:3 | /**\\n * ... e T\\n */ | | tst.js:246:1:249:3 | /**\\n * ... e T\\n */ |
| tst.js:252:1:252:18 | /** @return {T} */ | | tst.js:252:1:252:18 | /** @return {T} */ |
| tst.js:255:1:255:19 | /** @param {T} t */ | | tst.js:255:1:255:19 | /** @param {T} t */ |
| tst.js:258:1:258:28 | /** @ty ... ng>} */ | | tst.js:258:1:258:28 | /** @ty ... ng>} */ |
| tst.js:259:11:259:38 | /** @ty ... ng>} */ | | tst.js:259:11:259:38 | /** @ty ... ng>} */ |
| tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | | tst.js:261:1:265:3 | /**\\n * ... e T\\n */ |
| tst.js:269:1:272:3 | /**\\n * ... Val\\n */ | | tst.js:269:1:272:3 | /**\\n * ... Val\\n */ |
| tst.js:275:1:275:37 | /** @ty ... er>} */ | | tst.js:275:1:275:37 | /** @ty ... er>} */ |
| tst.js:277:1:279:3 | /**\\n * ... tor\\n */ | | tst.js:277:1:279:3 | /**\\n * ... tor\\n */ |
| tst.js:282:1:285:3 | /**\\n * ... tor\\n */ | | tst.js:282:1:285:3 | /**\\n * ... tor\\n */ |
| tst.js:288:1:288:22 | /** @ty ... <X>} */ | | tst.js:288:1:288:22 | /** @ty ... <X>} */ |
| tst.js:289:1:289:22 | /** @ty ... <Y>} */ | | tst.js:289:1:289:22 | /** @ty ... <Y>} */ |
| tst.js:294:1:294:28 | /** @pa ... fooY */ | | tst.js:294:1:294:28 | /** @pa ... fooY */ |
| tst.js:300:1:303:3 | /**\\n * ... e T\\n */ | | tst.js:300:1:303:3 | /**\\n * ... e T\\n */ |
| tst.js:306:1:306:19 | /** @param {T} t */ | | tst.js:306:1:306:19 | /** @param {T} t */ |
| tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ | | tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ |
| tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | | tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ |
| tst.js:322:1:325:3 | /**\\n * ... e T\\n */ | | tst.js:322:1:325:3 | /**\\n * ... e T\\n */ |
| tst.js:328:1:328:18 | /** @return {T} */ | | tst.js:328:1:328:18 | /** @return {T} */ |
| tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ |
| tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ |
| tst.js:345:1:345:21 | /** @ty ... ing} */ | | tst.js:345:1:345:21 | /** @ty ... ing} */ |
| tst.js:346:1:346:21 | /** @ty ... ber} */ | | tst.js:346:1:346:21 | /** @ty ... ber} */ |
| tst.js:347:1:347:21 | /** @ty ... ber} */ | | tst.js:347:1:347:21 | /** @ty ... ber} */ |
| tst.js:349:1:349:31 | /** @ty ... ned} */ | | tst.js:349:1:349:31 | /** @ty ... ned} */ |
| tst.js:351:1:353:3 | /**\\n * ... ger\\n */ | | tst.js:351:1:353:3 | /**\\n * ... ger\\n */ |
| tst.js:356:1:359:3 | /**\\n * ... ion\\n */ | | tst.js:356:1:359:3 | /**\\n * ... ion\\n */ |
| tst.js:363:3:365:5 | /**\\n ... p\\n */ | | tst.js:363:3:365:5 | /**\\n ... p\\n */ |
| tst.js:368:3:370:5 | /**\\n ... p\\n */ | | tst.js:368:3:370:5 | /**\\n ... p\\n */ |
| tst.js:375:3:377:5 | /**\\n ... p\\n */ | | tst.js:375:3:377:5 | /**\\n ... p\\n */ |
| tst.js:380:3:382:5 | /**\\n ... p\\n */ | | tst.js:380:3:382:5 | /**\\n ... p\\n */ |
| tst.js:386:1:389:3 | /**\\n * ... } x\\n */ | | tst.js:386:1:389:3 | /**\\n * ... } x\\n */ |
test_JSDocTag
| tst.js:5:5:5:10 | @const | const | tst.js:5:1:5:13 | /** @const */ | 0 | (none) | (none) | (none) |
| tst.js:9:4:9:9 | @const | const | tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:10:4:10:8 | @type | type | tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ | 1 | (none) | (none) | string |
| tst.js:14:5:14:10 | @const | const | tst.js:14:1:14:13 | /** @const */ | 0 | (none) | (none) | (none) |
| tst.js:18:4:18:15 | @constructor | constructor | tst.js:16:1:19:3 | /**\\n * ... tor\\n */ | 0 | (none) | (none) | (none) |
| tst.js:23:5:23:11 | @define | define | tst.js:23:1:23:24 | /** @de ... ean} */ | 0 | (none) | (none) | boolean |
| tst.js:26:5:26:11 | @define | define | tst.js:26:1:26:24 | /** @de ... ean} */ | 0 | (none) | (none) | boolean |
| tst.js:31:4:31:10 | @return | return | tst.js:29:1:35:3 | /**\\n * ... ().\\n */ | 0 | True if the contents of\nthe element are editable, but the element\nitself is not.\n | (none) | boolean |
| tst.js:34:4:34:14 | @deprecated | deprecated | tst.js:29:1:35:3 | /**\\n * ... ().\\n */ | 1 | Use isField(). | (none) | (none) |
| tst.js:40:4:40:15 | @constructor | constructor | tst.js:39:1:42:3 | /**\\n * ... ict\\n */ | 0 | (none) | (none) | (none) |
| tst.js:41:4:41:8 | @dict | dict | tst.js:39:1:42:3 | /**\\n * ... ict\\n */ | 1 | (none) | (none) | (none) |
| tst.js:48:16:48:20 | @dict | dict | tst.js:48:12:48:23 | /** @dict */ | 0 | (none) | (none) | (none) |
| tst.js:53:4:53:8 | @enum | enum | tst.js:51:1:54:3 | /**\\n * ... er}\\n */ | 0 | (none) | (none) | number |
| tst.js:61:5:61:11 | @export | export | tst.js:61:1:61:14 | /** @export */ | 0 | (none) | (none) | (none) |
| tst.js:67:4:67:15 | @constructor | constructor | tst.js:65:1:69:3 | /**\\n * ... st}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:68:4:68:11 | @extends | extends | tst.js:65:1:69:3 | /**\\n * ... st}\\n */ | 1 | (none) | (none) | goog.ds.BasicNodeList |
| tst.js:75:4:75:9 | @final | final | tst.js:73:1:77:3 | /**\\n * ... tor\\n */ | 0 | (none) | (none) | (none) |
| tst.js:76:4:76:15 | @constructor | constructor | tst.js:73:1:77:3 | /**\\n * ... tor\\n */ | 1 | (none) | (none) | (none) |
| tst.js:82:4:82:9 | @final | final | tst.js:80:1:83:3 | /**\\n * ... nal\\n */ | 0 | (none) | (none) | (none) |
| tst.js:88:4:88:13 | @interface | interface | tst.js:86:1:89:3 | /**\\n * ... ace\\n */ | 0 | (none) | (none) | (none) |
| tst.js:94:4:94:15 | @constructor | constructor | tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:95:4:95:14 | @implements | implements | tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ | 1 | (none) | (none) | Shape |
| tst.js:102:4:102:12 | @override | override | tst.js:101:1:103:17 | /**\\n * ... tDoc */ | 0 | (none) | (none) | (none) |
| tst.js:103:4:103:14 | @inheritDoc | inheritDoc | tst.js:101:1:103:17 | /**\\n * ... tDoc */ | 1 | (none) | (none) | (none) |
| tst.js:109:4:109:13 | @interface | interface | tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:110:4:110:11 | @extends | extends | tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ | 1 | (none) | (none) | Shape |
| tst.js:117:13:117:18 | @lends | lends | tst.js:117:9:117:40 | /** @le ... ype} */ | 0 | {Button.prototype} | (none) | (none) |
| tst.js:122:4:122:12 | @preserve | preserve | tst.js:121:1:126:3 | /**\\n * ... sh:\\n */ | 0 | Copyright 2009 SomeThirdParty.\nHere is the full license text and copyright\nnotice for this file. Note that the notice can span several\nlines and is only terminated by the closing star and slash: | (none) | (none) |
| tst.js:128:5:128:18 | @nosideeffects | nosideeffects | tst.js:128:1:128:21 | /** @no ... ects */ | 0 | (none) | (none) | (none) |
| tst.js:134:4:134:10 | @return | return | tst.js:131:1:136:3 | /**\\n * ... age\\n */ | 0 | The window object of the peer.\n | (none) | Object |
| tst.js:135:4:135:11 | @package | package | tst.js:131:1:136:3 | /**\\n * ... age\\n */ | 1 | (none) | (none) | (none) |
| tst.js:142:4:142:9 | @param | param | tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ | 0 | Subgroup id to query.\n | groupNum | number |
| tst.js:143:4:143:9 | @param | param | tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ | 1 | An itemName,\nor itemId, or null to search everything. | term | (string\|number\|null) |
| tst.js:155:4:155:8 | @type | type | tst.js:153:1:157:3 | /**\\n * ... ate\\n */ | 0 | (none) | (none) | Array.<Function> |
| tst.js:156:4:156:11 | @private | private | tst.js:153:1:157:3 | /**\\n * ... ate\\n */ | 1 | (none) | (none) | (none) |
| tst.js:163:4:163:9 | @param | param | tst.js:160:1:165:3 | /**\\n * ... ted\\n */ | 0 | Root element for the component.\n | element | Element |
| tst.js:164:4:164:13 | @protected | protected | tst.js:160:1:165:3 | /**\\n * ... ted\\n */ | 1 | (none) | (none) | (none) |
| tst.js:171:4:171:10 | @return | return | tst.js:169:1:172:3 | /**\\n * ... ID.\\n */ | 0 | The hex ID. | (none) | string |
| tst.js:180:4:180:15 | @constructor | constructor | tst.js:179:1:182:3 | /**\\n * ... uct\\n */ | 0 | (none) | (none) | (none) |
| tst.js:181:4:181:10 | @struct | struct | tst.js:179:1:182:3 | /**\\n * ... uct\\n */ | 1 | (none) | (none) | (none) |
| tst.js:192:16:192:22 | @struct | struct | tst.js:192:12:192:25 | /** @struct */ | 0 | (none) | (none) | (none) |
| tst.js:198:12:198:16 | @this | this | tst.js:196:9:200:11 | /**\\n ... */ | 0 | (none) | (none) | (none) |
| tst.js:199:12:199:18 | @return | return | tst.js:196:9:200:11 | /**\\n ... */ | 1 | (none) | (none) | Element |
| tst.js:206:4:206:10 | @throws | throws | tst.js:205:1:207:3 | /**\\n * ... on}\\n */ | 0 | (none) | (none) | DOMException |
| tst.js:212:4:212:8 | @type | type | tst.js:210:1:213:3 | /**\\n * ... ng}\\n */ | 0 | (none) | (none) | string |
| tst.js:216:5:216:12 | @typedef | typedef | tst.js:216:1:216:33 | /** @ty ... er)} */ | 0 | (none) | (none) | (string\|number) |
| tst.js:219:5:219:10 | @param | param | tst.js:219:1:219:55 | /** @pa ... ing. */ | 0 | A number or a string. | x | goog.NumberLike |
| tst.js:223:5:223:9 | @type | type | tst.js:223:1:223:40 | /** @ty ... ct}} */ | 0 | (none) | (none) | {myNum: number, myObject} |
| tst.js:226:5:226:9 | @type | type | tst.js:226:1:226:22 | /** @ty ... er?} */ | 0 | (none) | (none) | number? |
| tst.js:229:5:229:9 | @type | type | tst.js:229:1:229:22 | /** @ty ... ect} */ | 0 | (none) | (none) | !Object |
| tst.js:233:4:233:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 0 | (none) | p1 | function (string, boolean) |
| tst.js:234:4:234:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 1 | (none) | p2 | function (): number |
| tst.js:235:4:235:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 2 | (none) | p3 | function (this: goog.ui.Menu, string) |
| tst.js:236:4:236:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 3 | (none) | p4 | function (new: goog.ui.Menu, string) |
| tst.js:237:4:237:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 4 | (none) | p5 | function (string, ...[number]): number |
| tst.js:238:4:238:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 5 | p6\n | var_args | ...number |
| tst.js:239:4:239:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 6 | p7\n | opt_argument | number= |
| tst.js:240:4:240:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 7 | (none) | p8 | function (?string=, number=) |
| tst.js:241:4:241:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 8 | (none) | p9 | * |
| tst.js:242:4:242:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 9 | (none) | p10 | ? |
| tst.js:247:4:247:15 | @constructor | constructor | tst.js:246:1:249:3 | /**\\n * ... e T\\n */ | 0 | (none) | (none) | (none) |
| tst.js:248:4:248:12 | @template | template | tst.js:246:1:249:3 | /**\\n * ... e T\\n */ | 1 | T | (none) | (none) |
| tst.js:252:5:252:11 | @return | return | tst.js:252:1:252:18 | /** @return {T} */ | 0 | (none) | (none) | T |
| tst.js:255:5:255:10 | @param | param | tst.js:255:1:255:19 | /** @param {T} t */ | 0 | (none) | t | T |
| tst.js:258:5:258:9 | @type | type | tst.js:258:1:258:28 | /** @ty ... ng>} */ | 0 | (none) | (none) | !Foo.<string> |
| tst.js:259:15:259:19 | @type | type | tst.js:259:11:259:38 | /** @ty ... ng>} */ | 0 | (none) | (none) | !Foo.<string> |
| tst.js:262:4:262:9 | @param | param | tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | 0 | (none) | t | T |
| tst.js:263:4:263:15 | @constructor | constructor | tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | 1 | (none) | (none) | (none) |
| tst.js:264:4:264:12 | @template | template | tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | 2 | T | (none) | (none) |
| tst.js:270:4:270:15 | @constructor | constructor | tst.js:269:1:272:3 | /**\\n * ... Val\\n */ | 0 | (none) | (none) | (none) |
| tst.js:271:4:271:12 | @template | template | tst.js:269:1:272:3 | /**\\n * ... Val\\n */ | 1 | Key, Val | (none) | (none) |
| tst.js:275:5:275:9 | @type | type | tst.js:275:1:275:37 | /** @ty ... er>} */ | 0 | (none) | (none) | MyMap.<string, number> |
| tst.js:278:4:278:15 | @constructor | constructor | tst.js:277:1:279:3 | /**\\n * ... tor\\n */ | 0 | (none) | (none) | (none) |
| tst.js:283:4:283:11 | @extends | extends | tst.js:282:1:285:3 | /**\\n * ... tor\\n */ | 0 | (none) | (none) | X |
| tst.js:284:4:284:15 | @constructor | constructor | tst.js:282:1:285:3 | /**\\n * ... tor\\n */ | 1 | (none) | (none) | (none) |
| tst.js:288:5:288:9 | @type | type | tst.js:288:1:288:22 | /** @ty ... <X>} */ | 0 | (none) | (none) | Foo.<X> |
| tst.js:289:5:289:9 | @type | type | tst.js:289:1:289:22 | /** @ty ... <Y>} */ | 0 | (none) | (none) | Foo.<Y> |
| tst.js:294:5:294:10 | @param | param | tst.js:294:1:294:28 | /** @pa ... fooY */ | 0 | (none) | fooY | Foo.<Y> |
| tst.js:301:4:301:15 | @constructor | constructor | tst.js:300:1:303:3 | /**\\n * ... e T\\n */ | 0 | (none) | (none) | (none) |
| tst.js:302:4:302:12 | @template | template | tst.js:300:1:303:3 | /**\\n * ... e T\\n */ | 1 | T | (none) | (none) |
| tst.js:306:5:306:10 | @param | param | tst.js:306:1:306:19 | /** @param {T} t */ | 0 | (none) | t | T |
| tst.js:310:4:310:15 | @constructor | constructor | tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:311:4:311:11 | @extends | extends | tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ | 1 | (none) | (none) | A.<string> |
| tst.js:316:4:316:15 | @constructor | constructor | tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:317:4:317:12 | @template | template | tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | 1 | U\n | (none) | (none) |
| tst.js:318:4:318:11 | @extends | extends | tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | 2 | (none) | (none) | A.<U> |
| tst.js:323:4:323:13 | @interface | interface | tst.js:322:1:325:3 | /**\\n * ... e T\\n */ | 0 | (none) | (none) | (none) |
| tst.js:324:4:324:12 | @template | template | tst.js:322:1:325:3 | /**\\n * ... e T\\n */ | 1 | T | (none) | (none) |
| tst.js:328:5:328:11 | @return | return | tst.js:328:1:328:18 | /** @return {T} */ | 0 | (none) | (none) | T |
| tst.js:332:4:332:15 | @constructor | constructor | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:333:4:333:14 | @implements | implements | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | 1 | (none) | (none) | Foo.<string> |
| tst.js:334:4:334:14 | @implements | implements | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | 2 | (none) | (none) | Foo.<number> |
| tst.js:339:4:339:9 | @param | param | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | 0 | (none) | a | T |
| tst.js:340:4:340:10 | @return | return | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | 1 | (none) | (none) | T |
| tst.js:341:4:341:12 | @template | template | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | 2 | T | (none) | (none) |
| tst.js:345:5:345:9 | @type | type | tst.js:345:1:345:21 | /** @ty ... ing} */ | 0 | (none) | (none) | string |
| tst.js:346:5:346:9 | @type | type | tst.js:346:1:346:21 | /** @ty ... ber} */ | 0 | (none) | (none) | number |
| tst.js:347:5:347:9 | @type | type | tst.js:347:1:347:21 | /** @ty ... ber} */ | 0 | (none) | (none) | number |
| tst.js:349:5:349:9 | @type | type | tst.js:349:1:349:31 | /** @ty ... ned} */ | 0 | (none) | (none) | (string\|undefined) |
| tst.js:352:4:352:9 | @param | param | tst.js:351:1:353:3 | /**\\n * ... ger\\n */ | 0 | [int] an integer | (none) | (none) |
| tst.js:357:4:357:9 | @param | param | tst.js:356:1:359:3 | /**\\n * ... ion\\n */ | 0 | the array to sort\n | array | Array.<number> |
| tst.js:358:4:358:9 | @param | param | tst.js:356:1:359:3 | /**\\n * ... ion\\n */ | 1 | the comparator function | fn | function (x: !number, y: !number): number |
| tst.js:364:6:364:11 | @param | param | tst.js:363:3:365:5 | /**\\n ... p\\n */ | 0 | (none) | p | T1 |
| tst.js:369:6:369:11 | @param | param | tst.js:368:3:370:5 | /**\\n ... p\\n */ | 0 | (none) | p | T2 |
| tst.js:376:6:376:11 | @param | param | tst.js:375:3:377:5 | /**\\n ... p\\n */ | 0 | (none) | p | T3 |
| tst.js:381:6:381:11 | @param | param | tst.js:380:3:382:5 | /**\\n ... p\\n */ | 0 | (none) | p | T4 |
| tst.js:387:4:387:9 | @param | param | tst.js:386:1:389:3 | /**\\n * ... } x\\n */ | 0 | (none) | x | Array.<number> |
test_next_token
| tst.js:1:1:1:117 | // Test ... mpiler, | tst.js:5:15:5:17 | var |
| tst.js:2:1:2:118 | // whic ... se 2.0; | tst.js:5:15:5:17 | var |
| tst.js:3:1:3:20 | // see file COPYING. | tst.js:5:15:5:17 | var |
| tst.js:5:1:5:13 | /** @const */ | tst.js:5:15:5:17 | var |
| tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ | tst.js:12:1:12:11 | mynamespace |
| tst.js:14:1:14:13 | /** @const */ | tst.js:14:15:14:21 | MyClass |
| tst.js:16:1:19:3 | /**\\n * ... tor\\n */ | tst.js:20:1:20:8 | function |
| tst.js:23:1:23:24 | /** @de ... ean} */ | tst.js:24:1:24:3 | var |
| tst.js:26:1:26:24 | /** @de ... ean} */ | tst.js:27:1:27:4 | goog |
| tst.js:29:1:35:3 | /**\\n * ... ().\\n */ | tst.js:36:1:36:11 | BN_EditUtil |
| tst.js:39:1:42:3 | /**\\n * ... ict\\n */ | tst.js:43:1:43:8 | function |
| tst.js:46:16:46:25 | // warning | tst.js:48:1:48:3 | var |
| tst.js:48:12:48:23 | /** @dict */ | tst.js:48:25:48:25 | { |
| tst.js:49:16:49:25 | // warning | tst.js:55:1:55:7 | project |
| tst.js:51:1:54:3 | /**\\n * ... er}\\n */ | tst.js:55:1:55:7 | project |
| tst.js:61:1:61:14 | /** @export */ | tst.js:62:1:62:3 | foo |
| tst.js:65:1:69:3 | /**\\n * ... st}\\n */ | tst.js:70:1:70:4 | goog |
| tst.js:73:1:77:3 | /**\\n * ... tor\\n */ | tst.js:78:1:78:5 | sloth |
| tst.js:80:1:83:3 | /**\\n * ... nal\\n */ | tst.js:84:1:84:5 | sloth |
| tst.js:86:1:89:3 | /**\\n * ... ace\\n */ | tst.js:90:1:90:8 | function |
| tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ | tst.js:97:1:97:8 | function |
| tst.js:101:1:103:17 | /**\\n * ... tDoc */ | tst.js:104:1:104:7 | project |
| tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ | tst.js:112:1:112:8 | function |
| tst.js:117:9:117:40 | /** @le ... ype} */ | tst.js:117:42:117:42 | ( |
| tst.js:121:1:126:3 | /**\\n * ... sh:\\n */ | tst.js:129:1:129:8 | function |
| tst.js:128:1:128:21 | /** @no ... ects */ | tst.js:129:1:129:8 | function |
| tst.js:131:1:136:3 | /**\\n * ... age\\n */ | tst.js:137:1:137:4 | goog |
| tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ | tst.js:146:1:146:4 | goog |
| tst.js:149:14:149:26 | /** number */ | tst.js:149:28:149:28 | a |
| tst.js:149:31:149:43 | /** number */ | tst.js:149:45:149:45 | b |
| tst.js:153:1:157:3 | /**\\n * ... ate\\n */ | tst.js:158:1:158:4 | this |
| tst.js:160:1:165:3 | /**\\n * ... ted\\n */ | tst.js:166:1:166:4 | goog |
| tst.js:169:1:172:3 | /**\\n * ... ID.\\n */ | tst.js:173:1:173:4 | goog |
| tst.js:177:10:177:22 | /** number */ | tst.js:177:24:177:26 | foo |
| tst.js:179:1:182:3 | /**\\n * ... uct\\n */ | tst.js:183:1:183:8 | function |
| tst.js:187:24:187:28 | // OK | tst.js:188:1:188:4 | obj1 |
| tst.js:188:21:188:25 | // OK | tst.js:189:1:189:4 | obj1 |
| tst.js:189:22:189:31 | // warning | tst.js:190:1:190:4 | obj1 |
| tst.js:190:14:190:23 | // warning | tst.js:192:1:192:3 | var |
| tst.js:192:12:192:25 | /** @struct */ | tst.js:192:27:192:27 | { |
| tst.js:193:19:193:28 | // warning | tst.js:195:1:195:4 | chat |
| tst.js:196:9:200:11 | /**\\n ... */ | tst.js:201:9:201:16 | function |
| tst.js:205:1:207:3 | /**\\n * ... on}\\n */ | tst.js:208:1:208:19 | DOMApplicationCache |
| tst.js:210:1:213:3 | /**\\n * ... ng}\\n */ | tst.js:214:1:214:3 | var |
| tst.js:216:1:216:33 | /** @ty ... er)} */ | tst.js:217:1:217:4 | goog |
| tst.js:219:1:219:55 | /** @pa ... ing. */ | tst.js:220:1:220:4 | goog |
| tst.js:223:1:223:40 | /** @ty ... ct}} */ | tst.js:224:1:224:3 | var |
| tst.js:226:1:226:22 | /** @ty ... er?} */ | tst.js:227:1:227:3 | var |
| tst.js:229:1:229:22 | /** @ty ... ect} */ | tst.js:230:1:230:3 | var |
| tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | tst.js:244:1:244:3 | var |
| tst.js:246:1:249:3 | /**\\n * ... e T\\n */ | tst.js:250:1:250:3 | var |
| tst.js:252:1:252:18 | /** @return {T} */ | tst.js:253:1:253:3 | Foo |
| tst.js:255:1:255:19 | /** @param {T} t */ | tst.js:256:1:256:3 | Foo |
| tst.js:258:1:258:28 | /** @ty ... ng>} */ | tst.js:258:30:258:32 | var |
| tst.js:259:11:259:38 | /** @ty ... ng>} */ | tst.js:259:40:259:40 | ( |
| tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | tst.js:266:1:266:3 | Bar |
| tst.js:267:29:267:52 | // bar ... string> | tst.js:273:1:273:3 | var |
| tst.js:269:1:272:3 | /**\\n * ... Val\\n */ | tst.js:273:1:273:3 | var |
| tst.js:275:1:275:37 | /** @ty ... er>} */ | tst.js:275:39:275:41 | var |
| tst.js:275:48:275:77 | // Key ... number. | tst.js:280:1:280:1 | X |
| tst.js:277:1:279:3 | /**\\n * ... tor\\n */ | tst.js:280:1:280:1 | X |
| tst.js:282:1:285:3 | /**\\n * ... tor\\n */ | tst.js:286:1:286:1 | Y |
| tst.js:288:1:288:22 | /** @ty ... <X>} */ | tst.js:288:24:288:26 | var |
| tst.js:289:1:289:22 | /** @ty ... <Y>} */ | tst.js:289:24:289:26 | var |
| tst.js:291:14:291:21 | // Error | tst.js:292:1:292:4 | fooY |
| tst.js:292:14:292:21 | // Error | tst.js:295:1:295:9 | takesFooY |
| tst.js:294:1:294:28 | /** @pa ... fooY */ | tst.js:295:1:295:9 | takesFooY |
| tst.js:297:18:297:23 | // OK. | tst.js:298:1:298:9 | takesFooY |
| tst.js:298:18:298:25 | // Error | tst.js:304:1:304:1 | A |
| tst.js:300:1:303:3 | /**\\n * ... e T\\n */ | tst.js:304:1:304:1 | A |
| tst.js:306:1:306:19 | /** @param {T} t */ | tst.js:307:1:307:1 | A |
| tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ | tst.js:313:1:313:1 | B |
| tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | tst.js:320:1:320:1 | C |
| tst.js:322:1:325:3 | /**\\n * ... e T\\n */ | tst.js:326:1:326:3 | Foo |
| tst.js:328:1:328:18 | /** @return {T} */ | tst.js:329:1:329:3 | Foo |
| tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | tst.js:336:1:336:7 | FooImpl |
| tst.js:336:27:336:72 | // Erro ... e twice | tst.js:343:1:343:8 | identity |
| tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | tst.js:343:1:343:8 | identity |
| tst.js:345:1:345:21 | /** @ty ... ing} */ | tst.js:345:23:345:25 | var |
| tst.js:345:72:345:76 | // OK | tst.js:346:23:346:25 | var |
| tst.js:346:1:346:21 | /** @ty ... ber} */ | tst.js:346:23:346:25 | var |
| tst.js:346:60:346:64 | // OK | tst.js:347:23:347:25 | var |
| tst.js:347:1:347:21 | /** @ty ... ber} */ | tst.js:347:23:347:25 | var |
| tst.js:347:62:347:77 | // Type mismatch | tst.js:349:33:349:35 | var |
| tst.js:349:1:349:31 | /** @ty ... ned} */ | tst.js:349:33:349:35 | var |
| tst.js:351:1:353:3 | /**\\n * ... ger\\n */ | tst.js:354:1:354:8 | function |
| tst.js:356:1:359:3 | /**\\n * ... ion\\n */ | tst.js:360:1:360:8 | function |
| tst.js:363:3:365:5 | /**\\n ... p\\n */ | tst.js:366:3:366:15 | classicMethod |
| tst.js:368:3:370:5 | /**\\n ... p\\n */ | tst.js:371:3:371:13 | fancyMethod |
| tst.js:375:3:377:5 | /**\\n ... p\\n */ | tst.js:378:3:378:13 | constructor |
| tst.js:380:3:382:5 | /**\\n ... p\\n */ | tst.js:383:3:383:13 | classMethod |
| tst.js:386:1:389:3 | /**\\n * ... } x\\n */ | tst.js:390:1:390:8 | function |
test_JSDocTypeExpr
| tst.js:10:11:10:16 | string | tst.js:10:4:10:8 | @type | 0 |
| tst.js:23:14:23:20 | boolean | tst.js:23:5:23:11 | @define | 0 |
| tst.js:26:14:26:20 | boolean | tst.js:26:5:26:11 | @define | 0 |
| tst.js:31:13:31:19 | boolean | tst.js:31:4:31:10 | @return | 0 |
| tst.js:53:11:53:16 | number | tst.js:53:4:53:8 | @enum | 0 |
| tst.js:68:14:68:34 | goog.ds.BasicNodeList | tst.js:68:4:68:11 | @extends | 0 |
| tst.js:95:17:95:21 | Shape | tst.js:95:4:95:14 | @implements | 0 |
| tst.js:110:14:110:18 | Shape | tst.js:110:4:110:11 | @extends | 0 |
| tst.js:134:13:134:18 | Object | tst.js:134:4:134:10 | @return | 0 |
| tst.js:142:12:142:17 | number | tst.js:142:4:142:9 | @param | 0 |
| tst.js:143:12:143:17 | string | tst.js:143:12:143:29 | (string\|number\|null) | 0 |
| tst.js:143:12:143:29 | (string\|number\|null) | tst.js:143:4:143:9 | @param | 0 |
| tst.js:143:19:143:24 | number | tst.js:143:12:143:29 | (string\|number\|null) | 1 |
| tst.js:143:26:143:29 | null | tst.js:143:12:143:29 | (string\|number\|null) | 2 |
| tst.js:155:11:155:18 | Function | tst.js:155:11:155:20 | Array.<Function> | 0 |
| tst.js:155:11:155:20 | Array | tst.js:155:11:155:20 | Array.<Function> | -1 |
| tst.js:155:11:155:20 | Array.<Function> | tst.js:155:4:155:8 | @type | 0 |
| tst.js:163:12:163:18 | Element | tst.js:163:4:163:9 | @param | 0 |
| tst.js:171:13:171:18 | string | tst.js:171:4:171:10 | @return | 0 |
| tst.js:199:21:199:27 | Element | tst.js:199:12:199:18 | @return | 0 |
| tst.js:206:13:206:24 | DOMException | tst.js:206:4:206:10 | @throws | 0 |
| tst.js:212:11:212:16 | string | tst.js:212:4:212:8 | @type | 0 |
| tst.js:216:15:216:29 | (string\|number) | tst.js:216:5:216:12 | @typedef | 0 |
| tst.js:216:16:216:21 | string | tst.js:216:15:216:29 | (string\|number) | 0 |
| tst.js:216:23:216:28 | number | tst.js:216:15:216:29 | (string\|number) | 1 |
| tst.js:219:13:219:27 | goog.NumberLike | tst.js:219:5:219:10 | @param | 0 |
| tst.js:223:12:223:36 | {myNum: number, myObject} | tst.js:223:5:223:9 | @type | 0 |
| tst.js:223:20:223:25 | number | tst.js:223:12:223:36 | {myNum: number, myObject} | 0 |
| tst.js:226:12:226:17 | number | tst.js:226:12:226:18 | number? | 0 |
| tst.js:226:12:226:18 | number? | tst.js:226:5:226:9 | @type | 0 |
| tst.js:229:12:229:18 | !Object | tst.js:229:5:229:9 | @type | 0 |
| tst.js:229:13:229:18 | Object | tst.js:229:12:229:18 | !Object | 0 |
| tst.js:233:12:233:36 | function (string, boolean) | tst.js:233:4:233:9 | @param | 0 |
| tst.js:233:21:233:26 | string | tst.js:233:12:233:36 | function (string, boolean) | 0 |
| tst.js:233:29:233:35 | boolean | tst.js:233:12:233:36 | function (string, boolean) | 1 |
| tst.js:234:12:234:29 | function (): number | tst.js:234:4:234:9 | @param | 0 |
| tst.js:234:24:234:29 | number | tst.js:234:12:234:29 | function (): number | -1 |
| tst.js:235:12:235:46 | function (this: goog.ui.Menu, string) | tst.js:235:4:235:9 | @param | 0 |
| tst.js:235:26:235:37 | goog.ui.Menu | tst.js:235:12:235:46 | function (this: goog.ui.Menu, string) | -2 |
| tst.js:235:40:235:45 | string | tst.js:235:12:235:46 | function (this: goog.ui.Menu, string) | 0 |
| tst.js:236:12:236:45 | function (new: goog.ui.Menu, string) | tst.js:236:4:236:9 | @param | 0 |
| tst.js:236:25:236:36 | goog.ui.Menu | tst.js:236:12:236:45 | function (new: goog.ui.Menu, string) | -2 |
| tst.js:236:39:236:44 | string | tst.js:236:12:236:45 | function (new: goog.ui.Menu, string) | 0 |
| tst.js:237:12:237:48 | function (string, ...[number]): number | tst.js:237:4:237:9 | @param | 0 |
| tst.js:237:21:237:26 | string | tst.js:237:12:237:48 | function (string, ...[number]): number | 0 |
| tst.js:237:32:237:39 | ...[number] | tst.js:237:12:237:48 | function (string, ...[number]): number | 1 |
| tst.js:237:32:237:39 | [number] | tst.js:237:32:237:39 | ...[number] | 0 |
| tst.js:237:33:237:38 | number | tst.js:237:32:237:39 | [number] | 0 |
| tst.js:237:43:237:48 | number | tst.js:237:12:237:48 | function (string, ...[number]): number | -1 |
| tst.js:238:12:238:20 | ...number | tst.js:238:4:238:9 | @param | 0 |
| tst.js:238:15:238:20 | number | tst.js:238:12:238:20 | ...number | 0 |
| tst.js:239:12:239:17 | number | tst.js:239:12:239:18 | number= | 0 |
| tst.js:239:12:239:18 | number= | tst.js:239:4:239:9 | @param | 0 |
| tst.js:240:12:240:38 | function (?string=, number=) | tst.js:240:4:240:9 | @param | 0 |
| tst.js:240:21:240:27 | ?string | tst.js:240:21:240:28 | ?string= | 0 |
| tst.js:240:21:240:28 | ?string= | tst.js:240:12:240:38 | function (?string=, number=) | 0 |
| tst.js:240:22:240:27 | string | tst.js:240:21:240:27 | ?string | 0 |
| tst.js:240:31:240:36 | number | tst.js:240:31:240:37 | number= | 0 |
| tst.js:240:31:240:37 | number= | tst.js:240:12:240:38 | function (?string=, number=) | 1 |
| tst.js:241:12:241:12 | * | tst.js:241:4:241:9 | @param | 0 |
| tst.js:242:12:242:12 | ? | tst.js:242:4:242:9 | @param | 0 |
| tst.js:252:14:252:14 | T | tst.js:252:5:252:11 | @return | 0 |
| tst.js:255:13:255:13 | T | tst.js:255:5:255:10 | @param | 0 |
| tst.js:258:12:258:24 | !Foo.<string> | tst.js:258:5:258:9 | @type | 0 |
| tst.js:258:13:258:15 | Foo | tst.js:258:13:258:24 | Foo.<string> | -1 |
| tst.js:258:13:258:24 | Foo.<string> | tst.js:258:12:258:24 | !Foo.<string> | 0 |
| tst.js:258:18:258:23 | string | tst.js:258:13:258:24 | Foo.<string> | 0 |
| tst.js:259:22:259:34 | !Foo.<string> | tst.js:259:15:259:19 | @type | 0 |
| tst.js:259:23:259:25 | Foo | tst.js:259:23:259:34 | Foo.<string> | -1 |
| tst.js:259:23:259:34 | Foo.<string> | tst.js:259:22:259:34 | !Foo.<string> | 0 |
| tst.js:259:28:259:33 | string | tst.js:259:23:259:34 | Foo.<string> | 0 |
| tst.js:262:12:262:12 | T | tst.js:262:4:262:9 | @param | 0 |
| tst.js:275:12:275:16 | MyMap | tst.js:275:12:275:33 | MyMap.<string, number> | -1 |
| tst.js:275:12:275:33 | MyMap.<string, number> | tst.js:275:5:275:9 | @type | 0 |
| tst.js:275:19:275:24 | string | tst.js:275:12:275:33 | MyMap.<string, number> | 0 |
| tst.js:275:27:275:32 | number | tst.js:275:12:275:33 | MyMap.<string, number> | 1 |
| tst.js:283:14:283:14 | X | tst.js:283:4:283:11 | @extends | 0 |
| tst.js:288:12:288:14 | Foo | tst.js:288:12:288:18 | Foo.<X> | -1 |
| tst.js:288:12:288:18 | Foo.<X> | tst.js:288:5:288:9 | @type | 0 |
| tst.js:288:17:288:17 | X | tst.js:288:12:288:18 | Foo.<X> | 0 |
| tst.js:289:12:289:14 | Foo | tst.js:289:12:289:18 | Foo.<Y> | -1 |
| tst.js:289:12:289:18 | Foo.<Y> | tst.js:289:5:289:9 | @type | 0 |
| tst.js:289:17:289:17 | Y | tst.js:289:12:289:18 | Foo.<Y> | 0 |
| tst.js:294:13:294:15 | Foo | tst.js:294:13:294:19 | Foo.<Y> | -1 |
| tst.js:294:13:294:19 | Foo.<Y> | tst.js:294:5:294:10 | @param | 0 |
| tst.js:294:18:294:18 | Y | tst.js:294:13:294:19 | Foo.<Y> | 0 |
| tst.js:306:13:306:13 | T | tst.js:306:5:306:10 | @param | 0 |
| tst.js:311:14:311:14 | A | tst.js:311:14:311:23 | A.<string> | -1 |
| tst.js:311:14:311:23 | A.<string> | tst.js:311:4:311:11 | @extends | 0 |
| tst.js:311:17:311:22 | string | tst.js:311:14:311:23 | A.<string> | 0 |
| tst.js:318:14:318:14 | A | tst.js:318:14:318:18 | A.<U> | -1 |
| tst.js:318:14:318:18 | A.<U> | tst.js:318:4:318:11 | @extends | 0 |
| tst.js:318:17:318:17 | U | tst.js:318:14:318:18 | A.<U> | 0 |
| tst.js:328:14:328:14 | T | tst.js:328:5:328:11 | @return | 0 |
| tst.js:333:17:333:19 | Foo | tst.js:333:17:333:28 | Foo.<string> | -1 |
| tst.js:333:17:333:28 | Foo.<string> | tst.js:333:4:333:14 | @implements | 0 |
| tst.js:333:22:333:27 | string | tst.js:333:17:333:28 | Foo.<string> | 0 |
| tst.js:334:17:334:19 | Foo | tst.js:334:17:334:28 | Foo.<number> | -1 |
| tst.js:334:17:334:28 | Foo.<number> | tst.js:334:4:334:14 | @implements | 0 |
| tst.js:334:22:334:27 | number | tst.js:334:17:334:28 | Foo.<number> | 0 |
| tst.js:339:12:339:12 | T | tst.js:339:4:339:9 | @param | 0 |
| tst.js:340:13:340:13 | T | tst.js:340:4:340:10 | @return | 0 |
| tst.js:345:12:345:17 | string | tst.js:345:5:345:9 | @type | 0 |
| tst.js:346:12:346:17 | number | tst.js:346:5:346:9 | @type | 0 |
| tst.js:347:12:347:17 | number | tst.js:347:5:347:9 | @type | 0 |
| tst.js:349:12:349:17 | string | tst.js:349:12:349:27 | (string\|undefined) | 0 |
| tst.js:349:12:349:27 | (string\|undefined) | tst.js:349:5:349:9 | @type | 0 |
| tst.js:349:19:349:27 | undefined | tst.js:349:12:349:27 | (string\|undefined) | 1 |
| tst.js:357:12:357:16 | Array | tst.js:357:12:357:25 | Array.<number> | -1 |
| tst.js:357:12:357:25 | Array.<number> | tst.js:357:4:357:9 | @param | 0 |
| tst.js:357:19:357:24 | number | tst.js:357:12:357:25 | Array.<number> | 0 |
| tst.js:358:12:358:48 | function (x: !number, y: !number): number | tst.js:358:4:358:9 | @param | 0 |
| tst.js:358:23:358:29 | !number | tst.js:358:12:358:48 | function (x: !number, y: !number): number | 0 |
| tst.js:358:24:358:29 | number | tst.js:358:23:358:29 | !number | 0 |
| tst.js:358:34:358:40 | !number | tst.js:358:12:358:48 | function (x: !number, y: !number): number | 1 |
| tst.js:358:35:358:40 | number | tst.js:358:34:358:40 | !number | 0 |
| tst.js:358:43:358:48 | number | tst.js:358:12:358:48 | function (x: !number, y: !number): number | -1 |
| tst.js:364:14:364:15 | T1 | tst.js:364:6:364:11 | @param | 0 |
| tst.js:369:14:369:15 | T2 | tst.js:369:6:369:11 | @param | 0 |
| tst.js:376:14:376:15 | T3 | tst.js:376:6:376:11 | @param | 0 |
| tst.js:381:14:381:15 | T4 | tst.js:381:6:381:11 | @param | 0 |
| tst.js:387:12:387:16 | Array | tst.js:387:12:388:13 | Array.<number> | -1 |
| tst.js:387:12:388:13 | Array.<number> | tst.js:387:4:387:9 | @param | 0 |
| tst.js:388:7:388:12 | number | tst.js:387:12:388:13 | Array.<number> | 0 |
test_getParameterTag
| tst.js:146:37:146:44 | groupNum | groupNum | tst.js:142:4:142:9 | @param | groupNum | tst.js:142:12:142:17 | number |
| tst.js:146:47:146:50 | term | term | tst.js:143:4:143:9 | @param | term | tst.js:143:12:143:29 | (string\|number\|null) |
| tst.js:166:59:166:65 | element | element | tst.js:163:4:163:9 | @param | element | tst.js:163:12:163:18 | Element |
| tst.js:220:28:220:28 | x | x | tst.js:219:5:219:10 | @param | x | tst.js:219:13:219:27 | goog.NumberLike |
| tst.js:256:30:256:30 | t | t | tst.js:255:5:255:10 | @param | t | tst.js:255:13:255:13 | T |
| tst.js:266:16:266:16 | t | t | tst.js:262:4:262:9 | @param | t | tst.js:262:12:262:12 | T |
| tst.js:295:22:295:25 | fooY | fooY | tst.js:294:5:294:10 | @param | fooY | tst.js:294:13:294:19 | Foo.<Y> |
| tst.js:307:31:307:31 | t | t | tst.js:306:5:306:10 | @param | t | tst.js:306:13:306:13 | T |
| tst.js:343:21:343:21 | a | a | tst.js:339:4:339:9 | @param | a | tst.js:339:12:339:12 | T |
| tst.js:360:15:360:19 | array | array | tst.js:357:4:357:9 | @param | array | tst.js:357:12:357:25 | Array.<number> |
| tst.js:360:22:360:23 | fn | fn | tst.js:358:4:358:9 | @param | fn | tst.js:358:12:358:48 | function (x: !number, y: !number): number |
| tst.js:366:27:366:27 | p | p | tst.js:364:6:364:11 | @param | p | tst.js:364:14:364:15 | T1 |
| tst.js:371:15:371:15 | p | p | tst.js:369:6:369:11 | @param | p | tst.js:369:14:369:15 | T2 |
| tst.js:378:15:378:15 | p | p | tst.js:376:6:376:11 | @param | p | tst.js:376:14:376:15 | T3 |
| tst.js:383:15:383:15 | p | p | tst.js:381:6:381:11 | @param | p | tst.js:381:14:381:15 | T4 |
| tst.js:390:20:390:20 | x | x | tst.js:387:4:387:9 | @param | x | tst.js:387:12:388:13 | Array.<number> |
test_JSDocArrayTypeExpr
| tst.js:237:32:237:39 | [number] | 0 | tst.js:237:33:237:38 | number |
test_JSDocUnionTypeExpr
| tst.js:143:12:143:29 | (string\|number\|null) | tst.js:143:12:143:17 | string |
| tst.js:143:12:143:29 | (string\|number\|null) | tst.js:143:19:143:24 | number |
@@ -6,14 +424,58 @@ test_JSDocUnionTypeExpr
| tst.js:216:15:216:29 | (string\|number) | tst.js:216:23:216:28 | number |
| tst.js:349:12:349:27 | (string\|undefined) | tst.js:349:12:349:17 | string |
| tst.js:349:12:349:27 | (string\|undefined) | tst.js:349:19:349:27 | undefined |
test_JSDocArrayTypeExpr
| tst.js:237:32:237:39 | [number] | 0 | tst.js:237:33:237:38 | number |
test_Parameter_getDocumentation
| tst.js:149:28:149:28 | a | tst.js:149:14:149:26 | /** number */ |
| tst.js:149:45:149:45 | b | tst.js:149:31:149:43 | /** number */ |
test_JSDocRecordTypeExpr
| tst.js:223:12:223:36 | {myNum: number, myObject} | myNum | number |
| tst.js:223:12:223:36 | {myNum: number, myObject} | myObject | (none) |
test_JSDocAppliedTypeExpr
| tst.js:155:11:155:20 | Array.<Function> | tst.js:155:11:155:20 | Array | 0 | tst.js:155:11:155:18 | Function |
| tst.js:258:13:258:24 | Foo.<string> | tst.js:258:13:258:15 | Foo | 0 | tst.js:258:18:258:23 | string |
| tst.js:259:23:259:34 | Foo.<string> | tst.js:259:23:259:25 | Foo | 0 | tst.js:259:28:259:33 | string |
| tst.js:275:12:275:33 | MyMap.<string, number> | tst.js:275:12:275:16 | MyMap | 0 | tst.js:275:19:275:24 | string |
| tst.js:275:12:275:33 | MyMap.<string, number> | tst.js:275:12:275:16 | MyMap | 1 | tst.js:275:27:275:32 | number |
| tst.js:288:12:288:18 | Foo.<X> | tst.js:288:12:288:14 | Foo | 0 | tst.js:288:17:288:17 | X |
| tst.js:289:12:289:18 | Foo.<Y> | tst.js:289:12:289:14 | Foo | 0 | tst.js:289:17:289:17 | Y |
| tst.js:294:13:294:19 | Foo.<Y> | tst.js:294:13:294:15 | Foo | 0 | tst.js:294:18:294:18 | Y |
| tst.js:311:14:311:23 | A.<string> | tst.js:311:14:311:14 | A | 0 | tst.js:311:17:311:22 | string |
| tst.js:318:14:318:18 | A.<U> | tst.js:318:14:318:14 | A | 0 | tst.js:318:17:318:17 | U |
| tst.js:333:17:333:28 | Foo.<string> | tst.js:333:17:333:19 | Foo | 0 | tst.js:333:22:333:27 | string |
| tst.js:334:17:334:28 | Foo.<number> | tst.js:334:17:334:19 | Foo | 0 | tst.js:334:22:334:27 | number |
| tst.js:357:12:357:25 | Array.<number> | tst.js:357:12:357:16 | Array | 0 | tst.js:357:19:357:24 | number |
| tst.js:387:12:388:13 | Array.<number> | tst.js:387:12:387:16 | Array | 0 | tst.js:388:7:388:12 | number |
test_JSDocFunctionTypeExpr
| tst.js:233:12:233:36 | function (string, boolean) | (none) | (none) | 0 | tst.js:233:21:233:26 | string | no |
| tst.js:233:12:233:36 | function (string, boolean) | (none) | (none) | 1 | tst.js:233:29:233:35 | boolean | no |
| tst.js:235:12:235:46 | function (this: goog.ui.Menu, string) | (none) | goog.ui.Menu | 0 | tst.js:235:40:235:45 | string | no |
| tst.js:236:12:236:45 | function (new: goog.ui.Menu, string) | (none) | goog.ui.Menu | 0 | tst.js:236:39:236:44 | string | yes |
| tst.js:237:12:237:48 | function (string, ...[number]): number | number | (none) | 0 | tst.js:237:21:237:26 | string | no |
| tst.js:237:12:237:48 | function (string, ...[number]): number | number | (none) | 1 | tst.js:237:32:237:39 | ...[number] | no |
| tst.js:240:12:240:38 | function (?string=, number=) | (none) | (none) | 0 | tst.js:240:21:240:28 | ?string= | no |
| tst.js:240:12:240:38 | function (?string=, number=) | (none) | (none) | 1 | tst.js:240:31:240:37 | number= | no |
| tst.js:358:12:358:48 | function (x: !number, y: !number): number | number | (none) | 0 | tst.js:358:23:358:29 | !number | no |
| tst.js:358:12:358:48 | function (x: !number, y: !number): number | number | (none) | 1 | tst.js:358:34:358:40 | !number | no |
test_JSDocNullableTypeExpr
| tst.js:226:12:226:18 | number? | tst.js:226:12:226:17 | number | postfix |
| tst.js:240:21:240:27 | ?string | tst.js:240:22:240:27 | string | prefix |
test_JSDocNonNullableTypeExpr
| tst.js:229:12:229:18 | !Object | tst.js:229:13:229:18 | Object | prefix |
| tst.js:258:12:258:24 | !Foo.<string> | tst.js:258:13:258:24 | Foo.<string> | prefix |
| tst.js:259:22:259:34 | !Foo.<string> | tst.js:259:23:259:34 | Foo.<string> | prefix |
| tst.js:358:23:358:29 | !number | tst.js:358:24:358:29 | number | prefix |
| tst.js:358:34:358:40 | !number | tst.js:358:35:358:40 | number | prefix |
test_ParExpr_getDocumentation
| tst.js:117:42:119:10 | ({\\n ... }) | tst.js:117:9:117:40 | /** @le ... ype} */ |
| tst.js:259:40:259:50 | (new Foo()) | tst.js:259:11:259:38 | /** @ty ... ng>} */ |
test_JSDocRestParameterTypeExpr
| tst.js:237:32:237:39 | ...[number] | tst.js:237:32:237:39 | [number] |
| tst.js:238:12:238:20 | ...number | tst.js:238:15:238:20 | number |
test_Parameter_getDocumentation
| tst.js:149:28:149:28 | a | tst.js:149:14:149:26 | /** number */ |
| tst.js:149:45:149:45 | b | tst.js:149:31:149:43 | /** number */ |
test_ObjectExpr_getDocumentation
| tst.js:48:25:48:36 | { 'x': 321 } | tst.js:48:12:48:23 | /** @dict */ |
| tst.js:55:20:59:1 | {\\n TRU ... BE: 0\\n} | tst.js:51:1:54:3 | /**\\n * ... er}\\n */ |
| tst.js:117:43:119:9 | {\\n ... } | tst.js:117:9:117:40 | /** @le ... ype} */ |
| tst.js:192:27:192:36 | { x: 321 } | tst.js:192:12:192:25 | /** @struct */ |
test_AssignExpr_getDocumentation
| tst.js:12:1:12:29 | mynames ... 'stout' | tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ |
| tst.js:14:15:14:39 | MyClass ... 'stout' | tst.js:14:1:14:13 | /** @const */ |
@@ -46,6 +508,10 @@ test_AssignExpr_getDocumentation
| tst.js:329:1:329:33 | Foo.pro ... on() {} | tst.js:328:1:328:18 | /** @return {T} */ |
| tst.js:336:1:336:24 | FooImpl ... n() { } | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ |
| tst.js:343:1:343:36 | identit ... rn a; } | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ |
test_JSDocOptionalParameterTypeExpr
| tst.js:239:12:239:18 | number= | tst.js:239:12:239:17 | number |
| tst.js:240:21:240:28 | ?string= | tst.js:240:21:240:27 | ?string |
| tst.js:240:31:240:37 | number= | tst.js:240:31:240:36 | number |
test_Function_getDocumentation
| tst.js:20:1:21:1 | functio ... t() {\\n} | tst.js:16:1:19:3 | /**\\n * ... tor\\n */ |
| tst.js:36:34:37:1 | function(node) {\\n} | tst.js:29:1:35:3 | /**\\n * ... ().\\n */ |
@@ -293,469 +759,3 @@ test_OtherExpr_getDocumentation
| tst.js:371:3:371:13 | fancyMethod | tst.js:368:3:370:5 | /**\\n ... p\\n */ |
| tst.js:378:3:378:13 | constructor | tst.js:375:3:377:5 | /**\\n ... p\\n */ |
| tst.js:383:3:383:13 | classMethod | tst.js:380:3:382:5 | /**\\n ... p\\n */ |
test_JSDocRecordTypeExpr
| tst.js:223:12:223:36 | {myNum: number, myObject} | myNum | number |
| tst.js:223:12:223:36 | {myNum: number, myObject} | myObject | (none) |
test_JSDoc
| tst.js:5:1:5:13 | /** @const */ | | tst.js:5:1:5:13 | /** @const */ |
| tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ | My namespace's favorite kind of beer. | tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ |
| tst.js:14:1:14:13 | /** @const */ | | tst.js:14:1:14:13 | /** @const */ |
| tst.js:16:1:19:3 | /**\\n * ... tor\\n */ | A rectangle. | tst.js:16:1:19:3 | /**\\n * ... tor\\n */ |
| tst.js:23:1:23:24 | /** @de ... ean} */ | | tst.js:23:1:23:24 | /** @de ... ean} */ |
| tst.js:26:1:26:24 | /** @de ... ean} */ | | tst.js:26:1:26:24 | /** @de ... ean} */ |
| tst.js:29:1:35:3 | /**\\n * ... ().\\n */ | Determines whether a node is a field. | tst.js:29:1:35:3 | /**\\n * ... ().\\n */ |
| tst.js:39:1:42:3 | /**\\n * ... ict\\n */ | | tst.js:39:1:42:3 | /**\\n * ... ict\\n */ |
| tst.js:48:12:48:23 | /** @dict */ | | tst.js:48:12:48:23 | /** @dict */ |
| tst.js:51:1:54:3 | /**\\n * ... er}\\n */ | Enum for tri-state values. | tst.js:51:1:54:3 | /**\\n * ... er}\\n */ |
| tst.js:61:1:61:14 | /** @export */ | | tst.js:61:1:61:14 | /** @export */ |
| tst.js:65:1:69:3 | /**\\n * ... st}\\n */ | Immutable empty node list. | tst.js:65:1:69:3 | /**\\n * ... st}\\n */ |
| tst.js:73:1:77:3 | /**\\n * ... tor\\n */ | A class that cannot be extended. | tst.js:73:1:77:3 | /**\\n * ... tor\\n */ |
| tst.js:80:1:83:3 | /**\\n * ... nal\\n */ | A method that cannot be overridden. | tst.js:80:1:83:3 | /**\\n * ... nal\\n */ |
| tst.js:86:1:89:3 | /**\\n * ... ace\\n */ | A shape. | tst.js:86:1:89:3 | /**\\n * ... ace\\n */ |
| tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ | | tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ |
| tst.js:101:1:103:17 | /**\\n * ... tDoc */ | | tst.js:101:1:103:17 | /**\\n * ... tDoc */ |
| tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ | A polygon. | tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ |
| tst.js:117:9:117:40 | /** @le ... ype} */ | | tst.js:117:9:117:40 | /** @le ... ype} */ |
| tst.js:121:1:126:3 | /**\\n * ... sh:\\n */ | | tst.js:121:1:126:3 | /**\\n * ... sh:\\n */ |
| tst.js:128:1:128:21 | /** @no ... ects */ | | tst.js:128:1:128:21 | /** @no ... ects */ |
| tst.js:131:1:136:3 | /**\\n * ... age\\n */ | Returns the window object the foreign document resides in. | tst.js:131:1:136:3 | /**\\n * ... age\\n */ |
| tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ | Queries a Baz for items. | tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ |
| tst.js:149:14:149:26 | /** number */ | number | tst.js:149:14:149:26 | /** number */ |
| tst.js:149:31:149:43 | /** number */ | number | tst.js:149:31:149:43 | /** number */ |
| tst.js:153:1:157:3 | /**\\n * ... ate\\n */ | Handlers that are listening to this logger. | tst.js:153:1:157:3 | /**\\n * ... ate\\n */ |
| tst.js:160:1:165:3 | /**\\n * ... ted\\n */ | Sets the component's root element to the given element.\nConsidered protected and final. | tst.js:160:1:165:3 | /**\\n * ... ted\\n */ |
| tst.js:169:1:172:3 | /**\\n * ... ID.\\n */ | Returns the ID of the last item. | tst.js:169:1:172:3 | /**\\n * ... ID.\\n */ |
| tst.js:177:10:177:22 | /** number */ | number | tst.js:177:10:177:22 | /** number */ |
| tst.js:179:1:182:3 | /**\\n * ... uct\\n */ | | tst.js:179:1:182:3 | /**\\n * ... uct\\n */ |
| tst.js:192:12:192:25 | /** @struct */ | | tst.js:192:12:192:25 | /** @struct */ |
| tst.js:196:9:200:11 | /**\\n ... */ | Returns the roster widget element. | tst.js:196:9:200:11 | /**\\n ... */ |
| tst.js:205:1:207:3 | /**\\n * ... on}\\n */ | | tst.js:205:1:207:3 | /**\\n * ... on}\\n */ |
| tst.js:210:1:213:3 | /**\\n * ... ng}\\n */ | The message hex ID. | tst.js:210:1:213:3 | /**\\n * ... ng}\\n */ |
| tst.js:216:1:216:33 | /** @ty ... er)} */ | | tst.js:216:1:216:33 | /** @ty ... er)} */ |
| tst.js:219:1:219:55 | /** @pa ... ing. */ | | tst.js:219:1:219:55 | /** @pa ... ing. */ |
| tst.js:223:1:223:40 | /** @ty ... ct}} */ | | tst.js:223:1:223:40 | /** @ty ... ct}} */ |
| tst.js:226:1:226:22 | /** @ty ... er?} */ | | tst.js:226:1:226:22 | /** @ty ... er?} */ |
| tst.js:229:1:229:22 | /** @ty ... ect} */ | | tst.js:229:1:229:22 | /** @ty ... ect} */ |
| tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ |
| tst.js:246:1:249:3 | /**\\n * ... e T\\n */ | | tst.js:246:1:249:3 | /**\\n * ... e T\\n */ |
| tst.js:252:1:252:18 | /** @return {T} */ | | tst.js:252:1:252:18 | /** @return {T} */ |
| tst.js:255:1:255:19 | /** @param {T} t */ | | tst.js:255:1:255:19 | /** @param {T} t */ |
| tst.js:258:1:258:28 | /** @ty ... ng>} */ | | tst.js:258:1:258:28 | /** @ty ... ng>} */ |
| tst.js:259:11:259:38 | /** @ty ... ng>} */ | | tst.js:259:11:259:38 | /** @ty ... ng>} */ |
| tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | | tst.js:261:1:265:3 | /**\\n * ... e T\\n */ |
| tst.js:269:1:272:3 | /**\\n * ... Val\\n */ | | tst.js:269:1:272:3 | /**\\n * ... Val\\n */ |
| tst.js:275:1:275:37 | /** @ty ... er>} */ | | tst.js:275:1:275:37 | /** @ty ... er>} */ |
| tst.js:277:1:279:3 | /**\\n * ... tor\\n */ | | tst.js:277:1:279:3 | /**\\n * ... tor\\n */ |
| tst.js:282:1:285:3 | /**\\n * ... tor\\n */ | | tst.js:282:1:285:3 | /**\\n * ... tor\\n */ |
| tst.js:288:1:288:22 | /** @ty ... <X>} */ | | tst.js:288:1:288:22 | /** @ty ... <X>} */ |
| tst.js:289:1:289:22 | /** @ty ... <Y>} */ | | tst.js:289:1:289:22 | /** @ty ... <Y>} */ |
| tst.js:294:1:294:28 | /** @pa ... fooY */ | | tst.js:294:1:294:28 | /** @pa ... fooY */ |
| tst.js:300:1:303:3 | /**\\n * ... e T\\n */ | | tst.js:300:1:303:3 | /**\\n * ... e T\\n */ |
| tst.js:306:1:306:19 | /** @param {T} t */ | | tst.js:306:1:306:19 | /** @param {T} t */ |
| tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ | | tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ |
| tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | | tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ |
| tst.js:322:1:325:3 | /**\\n * ... e T\\n */ | | tst.js:322:1:325:3 | /**\\n * ... e T\\n */ |
| tst.js:328:1:328:18 | /** @return {T} */ | | tst.js:328:1:328:18 | /** @return {T} */ |
| tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ |
| tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ |
| tst.js:345:1:345:21 | /** @ty ... ing} */ | | tst.js:345:1:345:21 | /** @ty ... ing} */ |
| tst.js:346:1:346:21 | /** @ty ... ber} */ | | tst.js:346:1:346:21 | /** @ty ... ber} */ |
| tst.js:347:1:347:21 | /** @ty ... ber} */ | | tst.js:347:1:347:21 | /** @ty ... ber} */ |
| tst.js:349:1:349:31 | /** @ty ... ned} */ | | tst.js:349:1:349:31 | /** @ty ... ned} */ |
| tst.js:351:1:353:3 | /**\\n * ... ger\\n */ | | tst.js:351:1:353:3 | /**\\n * ... ger\\n */ |
| tst.js:356:1:359:3 | /**\\n * ... ion\\n */ | | tst.js:356:1:359:3 | /**\\n * ... ion\\n */ |
| tst.js:363:3:365:5 | /**\\n ... p\\n */ | | tst.js:363:3:365:5 | /**\\n ... p\\n */ |
| tst.js:368:3:370:5 | /**\\n ... p\\n */ | | tst.js:368:3:370:5 | /**\\n ... p\\n */ |
| tst.js:375:3:377:5 | /**\\n ... p\\n */ | | tst.js:375:3:377:5 | /**\\n ... p\\n */ |
| tst.js:380:3:382:5 | /**\\n ... p\\n */ | | tst.js:380:3:382:5 | /**\\n ... p\\n */ |
| tst.js:386:1:389:3 | /**\\n * ... } x\\n */ | | tst.js:386:1:389:3 | /**\\n * ... } x\\n */ |
test_JSDocTag
| tst.js:5:5:5:10 | @const | const | tst.js:5:1:5:13 | /** @const */ | 0 | (none) | (none) | (none) |
| tst.js:9:4:9:9 | @const | const | tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:10:4:10:8 | @type | type | tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ | 1 | (none) | (none) | string |
| tst.js:14:5:14:10 | @const | const | tst.js:14:1:14:13 | /** @const */ | 0 | (none) | (none) | (none) |
| tst.js:18:4:18:15 | @constructor | constructor | tst.js:16:1:19:3 | /**\\n * ... tor\\n */ | 0 | (none) | (none) | (none) |
| tst.js:23:5:23:11 | @define | define | tst.js:23:1:23:24 | /** @de ... ean} */ | 0 | (none) | (none) | boolean |
| tst.js:26:5:26:11 | @define | define | tst.js:26:1:26:24 | /** @de ... ean} */ | 0 | (none) | (none) | boolean |
| tst.js:31:4:31:10 | @return | return | tst.js:29:1:35:3 | /**\\n * ... ().\\n */ | 0 | True if the contents of\nthe element are editable, but the element\nitself is not.\n | (none) | boolean |
| tst.js:34:4:34:14 | @deprecated | deprecated | tst.js:29:1:35:3 | /**\\n * ... ().\\n */ | 1 | Use isField(). | (none) | (none) |
| tst.js:40:4:40:15 | @constructor | constructor | tst.js:39:1:42:3 | /**\\n * ... ict\\n */ | 0 | (none) | (none) | (none) |
| tst.js:41:4:41:8 | @dict | dict | tst.js:39:1:42:3 | /**\\n * ... ict\\n */ | 1 | (none) | (none) | (none) |
| tst.js:48:16:48:20 | @dict | dict | tst.js:48:12:48:23 | /** @dict */ | 0 | (none) | (none) | (none) |
| tst.js:53:4:53:8 | @enum | enum | tst.js:51:1:54:3 | /**\\n * ... er}\\n */ | 0 | (none) | (none) | number |
| tst.js:61:5:61:11 | @export | export | tst.js:61:1:61:14 | /** @export */ | 0 | (none) | (none) | (none) |
| tst.js:67:4:67:15 | @constructor | constructor | tst.js:65:1:69:3 | /**\\n * ... st}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:68:4:68:11 | @extends | extends | tst.js:65:1:69:3 | /**\\n * ... st}\\n */ | 1 | (none) | (none) | goog.ds.BasicNodeList |
| tst.js:75:4:75:9 | @final | final | tst.js:73:1:77:3 | /**\\n * ... tor\\n */ | 0 | (none) | (none) | (none) |
| tst.js:76:4:76:15 | @constructor | constructor | tst.js:73:1:77:3 | /**\\n * ... tor\\n */ | 1 | (none) | (none) | (none) |
| tst.js:82:4:82:9 | @final | final | tst.js:80:1:83:3 | /**\\n * ... nal\\n */ | 0 | (none) | (none) | (none) |
| tst.js:88:4:88:13 | @interface | interface | tst.js:86:1:89:3 | /**\\n * ... ace\\n */ | 0 | (none) | (none) | (none) |
| tst.js:94:4:94:15 | @constructor | constructor | tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:95:4:95:14 | @implements | implements | tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ | 1 | (none) | (none) | Shape |
| tst.js:102:4:102:12 | @override | override | tst.js:101:1:103:17 | /**\\n * ... tDoc */ | 0 | (none) | (none) | (none) |
| tst.js:103:4:103:14 | @inheritDoc | inheritDoc | tst.js:101:1:103:17 | /**\\n * ... tDoc */ | 1 | (none) | (none) | (none) |
| tst.js:109:4:109:13 | @interface | interface | tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:110:4:110:11 | @extends | extends | tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ | 1 | (none) | (none) | Shape |
| tst.js:117:13:117:18 | @lends | lends | tst.js:117:9:117:40 | /** @le ... ype} */ | 0 | {Button.prototype} | (none) | (none) |
| tst.js:122:4:122:12 | @preserve | preserve | tst.js:121:1:126:3 | /**\\n * ... sh:\\n */ | 0 | Copyright 2009 SomeThirdParty.\nHere is the full license text and copyright\nnotice for this file. Note that the notice can span several\nlines and is only terminated by the closing star and slash: | (none) | (none) |
| tst.js:128:5:128:18 | @nosideeffects | nosideeffects | tst.js:128:1:128:21 | /** @no ... ects */ | 0 | (none) | (none) | (none) |
| tst.js:134:4:134:10 | @return | return | tst.js:131:1:136:3 | /**\\n * ... age\\n */ | 0 | The window object of the peer.\n | (none) | Object |
| tst.js:135:4:135:11 | @package | package | tst.js:131:1:136:3 | /**\\n * ... age\\n */ | 1 | (none) | (none) | (none) |
| tst.js:142:4:142:9 | @param | param | tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ | 0 | Subgroup id to query.\n | groupNum | number |
| tst.js:143:4:143:9 | @param | param | tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ | 1 | An itemName,\nor itemId, or null to search everything. | term | (string\|number\|null) |
| tst.js:155:4:155:8 | @type | type | tst.js:153:1:157:3 | /**\\n * ... ate\\n */ | 0 | (none) | (none) | Array.<Function> |
| tst.js:156:4:156:11 | @private | private | tst.js:153:1:157:3 | /**\\n * ... ate\\n */ | 1 | (none) | (none) | (none) |
| tst.js:163:4:163:9 | @param | param | tst.js:160:1:165:3 | /**\\n * ... ted\\n */ | 0 | Root element for the component.\n | element | Element |
| tst.js:164:4:164:13 | @protected | protected | tst.js:160:1:165:3 | /**\\n * ... ted\\n */ | 1 | (none) | (none) | (none) |
| tst.js:171:4:171:10 | @return | return | tst.js:169:1:172:3 | /**\\n * ... ID.\\n */ | 0 | The hex ID. | (none) | string |
| tst.js:180:4:180:15 | @constructor | constructor | tst.js:179:1:182:3 | /**\\n * ... uct\\n */ | 0 | (none) | (none) | (none) |
| tst.js:181:4:181:10 | @struct | struct | tst.js:179:1:182:3 | /**\\n * ... uct\\n */ | 1 | (none) | (none) | (none) |
| tst.js:192:16:192:22 | @struct | struct | tst.js:192:12:192:25 | /** @struct */ | 0 | (none) | (none) | (none) |
| tst.js:198:12:198:16 | @this | this | tst.js:196:9:200:11 | /**\\n ... */ | 0 | (none) | (none) | (none) |
| tst.js:199:12:199:18 | @return | return | tst.js:196:9:200:11 | /**\\n ... */ | 1 | (none) | (none) | Element |
| tst.js:206:4:206:10 | @throws | throws | tst.js:205:1:207:3 | /**\\n * ... on}\\n */ | 0 | (none) | (none) | DOMException |
| tst.js:212:4:212:8 | @type | type | tst.js:210:1:213:3 | /**\\n * ... ng}\\n */ | 0 | (none) | (none) | string |
| tst.js:216:5:216:12 | @typedef | typedef | tst.js:216:1:216:33 | /** @ty ... er)} */ | 0 | (none) | (none) | (string\|number) |
| tst.js:219:5:219:10 | @param | param | tst.js:219:1:219:55 | /** @pa ... ing. */ | 0 | A number or a string. | x | goog.NumberLike |
| tst.js:223:5:223:9 | @type | type | tst.js:223:1:223:40 | /** @ty ... ct}} */ | 0 | (none) | (none) | {myNum: number, myObject} |
| tst.js:226:5:226:9 | @type | type | tst.js:226:1:226:22 | /** @ty ... er?} */ | 0 | (none) | (none) | number? |
| tst.js:229:5:229:9 | @type | type | tst.js:229:1:229:22 | /** @ty ... ect} */ | 0 | (none) | (none) | !Object |
| tst.js:233:4:233:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 0 | (none) | p1 | function (string, boolean) |
| tst.js:234:4:234:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 1 | (none) | p2 | function (): number |
| tst.js:235:4:235:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 2 | (none) | p3 | function (this: goog.ui.Menu, string) |
| tst.js:236:4:236:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 3 | (none) | p4 | function (new: goog.ui.Menu, string) |
| tst.js:237:4:237:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 4 | (none) | p5 | function (string, ...[number]): number |
| tst.js:238:4:238:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 5 | p6\n | var_args | ...number |
| tst.js:239:4:239:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 6 | p7\n | opt_argument | number= |
| tst.js:240:4:240:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 7 | (none) | p8 | function (?string=, number=) |
| tst.js:241:4:241:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 8 | (none) | p9 | * |
| tst.js:242:4:242:9 | @param | param | tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | 9 | (none) | p10 | ? |
| tst.js:247:4:247:15 | @constructor | constructor | tst.js:246:1:249:3 | /**\\n * ... e T\\n */ | 0 | (none) | (none) | (none) |
| tst.js:248:4:248:12 | @template | template | tst.js:246:1:249:3 | /**\\n * ... e T\\n */ | 1 | T | (none) | (none) |
| tst.js:252:5:252:11 | @return | return | tst.js:252:1:252:18 | /** @return {T} */ | 0 | (none) | (none) | T |
| tst.js:255:5:255:10 | @param | param | tst.js:255:1:255:19 | /** @param {T} t */ | 0 | (none) | t | T |
| tst.js:258:5:258:9 | @type | type | tst.js:258:1:258:28 | /** @ty ... ng>} */ | 0 | (none) | (none) | !Foo.<string> |
| tst.js:259:15:259:19 | @type | type | tst.js:259:11:259:38 | /** @ty ... ng>} */ | 0 | (none) | (none) | !Foo.<string> |
| tst.js:262:4:262:9 | @param | param | tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | 0 | (none) | t | T |
| tst.js:263:4:263:15 | @constructor | constructor | tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | 1 | (none) | (none) | (none) |
| tst.js:264:4:264:12 | @template | template | tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | 2 | T | (none) | (none) |
| tst.js:270:4:270:15 | @constructor | constructor | tst.js:269:1:272:3 | /**\\n * ... Val\\n */ | 0 | (none) | (none) | (none) |
| tst.js:271:4:271:12 | @template | template | tst.js:269:1:272:3 | /**\\n * ... Val\\n */ | 1 | Key, Val | (none) | (none) |
| tst.js:275:5:275:9 | @type | type | tst.js:275:1:275:37 | /** @ty ... er>} */ | 0 | (none) | (none) | MyMap.<string, number> |
| tst.js:278:4:278:15 | @constructor | constructor | tst.js:277:1:279:3 | /**\\n * ... tor\\n */ | 0 | (none) | (none) | (none) |
| tst.js:283:4:283:11 | @extends | extends | tst.js:282:1:285:3 | /**\\n * ... tor\\n */ | 0 | (none) | (none) | X |
| tst.js:284:4:284:15 | @constructor | constructor | tst.js:282:1:285:3 | /**\\n * ... tor\\n */ | 1 | (none) | (none) | (none) |
| tst.js:288:5:288:9 | @type | type | tst.js:288:1:288:22 | /** @ty ... <X>} */ | 0 | (none) | (none) | Foo.<X> |
| tst.js:289:5:289:9 | @type | type | tst.js:289:1:289:22 | /** @ty ... <Y>} */ | 0 | (none) | (none) | Foo.<Y> |
| tst.js:294:5:294:10 | @param | param | tst.js:294:1:294:28 | /** @pa ... fooY */ | 0 | (none) | fooY | Foo.<Y> |
| tst.js:301:4:301:15 | @constructor | constructor | tst.js:300:1:303:3 | /**\\n * ... e T\\n */ | 0 | (none) | (none) | (none) |
| tst.js:302:4:302:12 | @template | template | tst.js:300:1:303:3 | /**\\n * ... e T\\n */ | 1 | T | (none) | (none) |
| tst.js:306:5:306:10 | @param | param | tst.js:306:1:306:19 | /** @param {T} t */ | 0 | (none) | t | T |
| tst.js:310:4:310:15 | @constructor | constructor | tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:311:4:311:11 | @extends | extends | tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ | 1 | (none) | (none) | A.<string> |
| tst.js:316:4:316:15 | @constructor | constructor | tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:317:4:317:12 | @template | template | tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | 1 | U\n | (none) | (none) |
| tst.js:318:4:318:11 | @extends | extends | tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | 2 | (none) | (none) | A.<U> |
| tst.js:323:4:323:13 | @interface | interface | tst.js:322:1:325:3 | /**\\n * ... e T\\n */ | 0 | (none) | (none) | (none) |
| tst.js:324:4:324:12 | @template | template | tst.js:322:1:325:3 | /**\\n * ... e T\\n */ | 1 | T | (none) | (none) |
| tst.js:328:5:328:11 | @return | return | tst.js:328:1:328:18 | /** @return {T} */ | 0 | (none) | (none) | T |
| tst.js:332:4:332:15 | @constructor | constructor | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | 0 | (none) | (none) | (none) |
| tst.js:333:4:333:14 | @implements | implements | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | 1 | (none) | (none) | Foo.<string> |
| tst.js:334:4:334:14 | @implements | implements | tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | 2 | (none) | (none) | Foo.<number> |
| tst.js:339:4:339:9 | @param | param | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | 0 | (none) | a | T |
| tst.js:340:4:340:10 | @return | return | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | 1 | (none) | (none) | T |
| tst.js:341:4:341:12 | @template | template | tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | 2 | T | (none) | (none) |
| tst.js:345:5:345:9 | @type | type | tst.js:345:1:345:21 | /** @ty ... ing} */ | 0 | (none) | (none) | string |
| tst.js:346:5:346:9 | @type | type | tst.js:346:1:346:21 | /** @ty ... ber} */ | 0 | (none) | (none) | number |
| tst.js:347:5:347:9 | @type | type | tst.js:347:1:347:21 | /** @ty ... ber} */ | 0 | (none) | (none) | number |
| tst.js:349:5:349:9 | @type | type | tst.js:349:1:349:31 | /** @ty ... ned} */ | 0 | (none) | (none) | (string\|undefined) |
| tst.js:352:4:352:9 | @param | param | tst.js:351:1:353:3 | /**\\n * ... ger\\n */ | 0 | [int] an integer | (none) | (none) |
| tst.js:357:4:357:9 | @param | param | tst.js:356:1:359:3 | /**\\n * ... ion\\n */ | 0 | the array to sort\n | array | Array.<number> |
| tst.js:358:4:358:9 | @param | param | tst.js:356:1:359:3 | /**\\n * ... ion\\n */ | 1 | the comparator function | fn | function (x: !number, y: !number): number |
| tst.js:364:6:364:11 | @param | param | tst.js:363:3:365:5 | /**\\n ... p\\n */ | 0 | (none) | p | T1 |
| tst.js:369:6:369:11 | @param | param | tst.js:368:3:370:5 | /**\\n ... p\\n */ | 0 | (none) | p | T2 |
| tst.js:376:6:376:11 | @param | param | tst.js:375:3:377:5 | /**\\n ... p\\n */ | 0 | (none) | p | T3 |
| tst.js:381:6:381:11 | @param | param | tst.js:380:3:382:5 | /**\\n ... p\\n */ | 0 | (none) | p | T4 |
| tst.js:387:4:387:9 | @param | param | tst.js:386:1:389:3 | /**\\n * ... } x\\n */ | 0 | (none) | x | Array.<number> |
test_ObjectExpr_getDocumentation
| tst.js:48:25:48:36 | { 'x': 321 } | tst.js:48:12:48:23 | /** @dict */ |
| tst.js:55:20:59:1 | {\\n TRU ... BE: 0\\n} | tst.js:51:1:54:3 | /**\\n * ... er}\\n */ |
| tst.js:117:43:119:9 | {\\n ... } | tst.js:117:9:117:40 | /** @le ... ype} */ |
| tst.js:192:27:192:36 | { x: 321 } | tst.js:192:12:192:25 | /** @struct */ |
test_JSDocFunctionTypeExpr
| tst.js:233:12:233:36 | function (string, boolean) | (none) | (none) | 0 | tst.js:233:21:233:26 | string | no |
| tst.js:233:12:233:36 | function (string, boolean) | (none) | (none) | 1 | tst.js:233:29:233:35 | boolean | no |
| tst.js:235:12:235:46 | function (this: goog.ui.Menu, string) | (none) | goog.ui.Menu | 0 | tst.js:235:40:235:45 | string | no |
| tst.js:236:12:236:45 | function (new: goog.ui.Menu, string) | (none) | goog.ui.Menu | 0 | tst.js:236:39:236:44 | string | yes |
| tst.js:237:12:237:48 | function (string, ...[number]): number | number | (none) | 0 | tst.js:237:21:237:26 | string | no |
| tst.js:237:12:237:48 | function (string, ...[number]): number | number | (none) | 1 | tst.js:237:32:237:39 | ...[number] | no |
| tst.js:240:12:240:38 | function (?string=, number=) | (none) | (none) | 0 | tst.js:240:21:240:28 | ?string= | no |
| tst.js:240:12:240:38 | function (?string=, number=) | (none) | (none) | 1 | tst.js:240:31:240:37 | number= | no |
| tst.js:358:12:358:48 | function (x: !number, y: !number): number | number | (none) | 0 | tst.js:358:23:358:29 | !number | no |
| tst.js:358:12:358:48 | function (x: !number, y: !number): number | number | (none) | 1 | tst.js:358:34:358:40 | !number | no |
test_JSDocNullableTypeExpr
| tst.js:226:12:226:18 | number? | tst.js:226:12:226:17 | number | postfix |
| tst.js:240:21:240:27 | ?string | tst.js:240:22:240:27 | string | prefix |
test_next_token
| tst.js:1:1:1:117 | // Test ... mpiler, | tst.js:5:15:5:17 | var |
| tst.js:2:1:2:118 | // whic ... se 2.0; | tst.js:5:15:5:17 | var |
| tst.js:3:1:3:20 | // see file COPYING. | tst.js:5:15:5:17 | var |
| tst.js:5:1:5:13 | /** @const */ | tst.js:5:15:5:17 | var |
| tst.js:7:1:11:3 | /**\\n * ... ng}\\n */ | tst.js:12:1:12:11 | mynamespace |
| tst.js:14:1:14:13 | /** @const */ | tst.js:14:15:14:21 | MyClass |
| tst.js:16:1:19:3 | /**\\n * ... tor\\n */ | tst.js:20:1:20:8 | function |
| tst.js:23:1:23:24 | /** @de ... ean} */ | tst.js:24:1:24:3 | var |
| tst.js:26:1:26:24 | /** @de ... ean} */ | tst.js:27:1:27:4 | goog |
| tst.js:29:1:35:3 | /**\\n * ... ().\\n */ | tst.js:36:1:36:11 | BN_EditUtil |
| tst.js:39:1:42:3 | /**\\n * ... ict\\n */ | tst.js:43:1:43:8 | function |
| tst.js:46:16:46:25 | // warning | tst.js:48:1:48:3 | var |
| tst.js:48:12:48:23 | /** @dict */ | tst.js:48:25:48:25 | { |
| tst.js:49:16:49:25 | // warning | tst.js:55:1:55:7 | project |
| tst.js:51:1:54:3 | /**\\n * ... er}\\n */ | tst.js:55:1:55:7 | project |
| tst.js:61:1:61:14 | /** @export */ | tst.js:62:1:62:3 | foo |
| tst.js:65:1:69:3 | /**\\n * ... st}\\n */ | tst.js:70:1:70:4 | goog |
| tst.js:73:1:77:3 | /**\\n * ... tor\\n */ | tst.js:78:1:78:5 | sloth |
| tst.js:80:1:83:3 | /**\\n * ... nal\\n */ | tst.js:84:1:84:5 | sloth |
| tst.js:86:1:89:3 | /**\\n * ... ace\\n */ | tst.js:90:1:90:8 | function |
| tst.js:93:1:96:3 | /**\\n * ... pe}\\n */ | tst.js:97:1:97:8 | function |
| tst.js:101:1:103:17 | /**\\n * ... tDoc */ | tst.js:104:1:104:7 | project |
| tst.js:107:1:111:3 | /**\\n * ... pe}\\n */ | tst.js:112:1:112:8 | function |
| tst.js:117:9:117:40 | /** @le ... ype} */ | tst.js:117:42:117:42 | ( |
| tst.js:121:1:126:3 | /**\\n * ... sh:\\n */ | tst.js:129:1:129:8 | function |
| tst.js:128:1:128:21 | /** @no ... ects */ | tst.js:129:1:129:8 | function |
| tst.js:131:1:136:3 | /**\\n * ... age\\n */ | tst.js:137:1:137:4 | goog |
| tst.js:140:1:145:3 | /**\\n * ... ng.\\n */ | tst.js:146:1:146:4 | goog |
| tst.js:149:14:149:26 | /** number */ | tst.js:149:28:149:28 | a |
| tst.js:149:31:149:43 | /** number */ | tst.js:149:45:149:45 | b |
| tst.js:153:1:157:3 | /**\\n * ... ate\\n */ | tst.js:158:1:158:4 | this |
| tst.js:160:1:165:3 | /**\\n * ... ted\\n */ | tst.js:166:1:166:4 | goog |
| tst.js:169:1:172:3 | /**\\n * ... ID.\\n */ | tst.js:173:1:173:4 | goog |
| tst.js:177:10:177:22 | /** number */ | tst.js:177:24:177:26 | foo |
| tst.js:179:1:182:3 | /**\\n * ... uct\\n */ | tst.js:183:1:183:8 | function |
| tst.js:187:24:187:28 | // OK | tst.js:188:1:188:4 | obj1 |
| tst.js:188:21:188:25 | // OK | tst.js:189:1:189:4 | obj1 |
| tst.js:189:22:189:31 | // warning | tst.js:190:1:190:4 | obj1 |
| tst.js:190:14:190:23 | // warning | tst.js:192:1:192:3 | var |
| tst.js:192:12:192:25 | /** @struct */ | tst.js:192:27:192:27 | { |
| tst.js:193:19:193:28 | // warning | tst.js:195:1:195:4 | chat |
| tst.js:196:9:200:11 | /**\\n ... */ | tst.js:201:9:201:16 | function |
| tst.js:205:1:207:3 | /**\\n * ... on}\\n */ | tst.js:208:1:208:19 | DOMApplicationCache |
| tst.js:210:1:213:3 | /**\\n * ... ng}\\n */ | tst.js:214:1:214:3 | var |
| tst.js:216:1:216:33 | /** @ty ... er)} */ | tst.js:217:1:217:4 | goog |
| tst.js:219:1:219:55 | /** @pa ... ing. */ | tst.js:220:1:220:4 | goog |
| tst.js:223:1:223:40 | /** @ty ... ct}} */ | tst.js:224:1:224:3 | var |
| tst.js:226:1:226:22 | /** @ty ... er?} */ | tst.js:227:1:227:3 | var |
| tst.js:229:1:229:22 | /** @ty ... ect} */ | tst.js:230:1:230:3 | var |
| tst.js:232:1:243:3 | /**\\n * ... p10\\n */ | tst.js:244:1:244:3 | var |
| tst.js:246:1:249:3 | /**\\n * ... e T\\n */ | tst.js:250:1:250:3 | var |
| tst.js:252:1:252:18 | /** @return {T} */ | tst.js:253:1:253:3 | Foo |
| tst.js:255:1:255:19 | /** @param {T} t */ | tst.js:256:1:256:3 | Foo |
| tst.js:258:1:258:28 | /** @ty ... ng>} */ | tst.js:258:30:258:32 | var |
| tst.js:259:11:259:38 | /** @ty ... ng>} */ | tst.js:259:40:259:40 | ( |
| tst.js:261:1:265:3 | /**\\n * ... e T\\n */ | tst.js:266:1:266:3 | Bar |
| tst.js:267:29:267:52 | // bar ... string> | tst.js:273:1:273:3 | var |
| tst.js:269:1:272:3 | /**\\n * ... Val\\n */ | tst.js:273:1:273:3 | var |
| tst.js:275:1:275:37 | /** @ty ... er>} */ | tst.js:275:39:275:41 | var |
| tst.js:275:48:275:77 | // Key ... number. | tst.js:280:1:280:1 | X |
| tst.js:277:1:279:3 | /**\\n * ... tor\\n */ | tst.js:280:1:280:1 | X |
| tst.js:282:1:285:3 | /**\\n * ... tor\\n */ | tst.js:286:1:286:1 | Y |
| tst.js:288:1:288:22 | /** @ty ... <X>} */ | tst.js:288:24:288:26 | var |
| tst.js:289:1:289:22 | /** @ty ... <Y>} */ | tst.js:289:24:289:26 | var |
| tst.js:291:14:291:21 | // Error | tst.js:292:1:292:4 | fooY |
| tst.js:292:14:292:21 | // Error | tst.js:295:1:295:9 | takesFooY |
| tst.js:294:1:294:28 | /** @pa ... fooY */ | tst.js:295:1:295:9 | takesFooY |
| tst.js:297:18:297:23 | // OK. | tst.js:298:1:298:9 | takesFooY |
| tst.js:298:18:298:25 | // Error | tst.js:304:1:304:1 | A |
| tst.js:300:1:303:3 | /**\\n * ... e T\\n */ | tst.js:304:1:304:1 | A |
| tst.js:306:1:306:19 | /** @param {T} t */ | tst.js:307:1:307:1 | A |
| tst.js:309:1:312:3 | /**\\n * ... g>}\\n */ | tst.js:313:1:313:1 | B |
| tst.js:315:1:319:3 | /**\\n * ... U>}\\n */ | tst.js:320:1:320:1 | C |
| tst.js:322:1:325:3 | /**\\n * ... e T\\n */ | tst.js:326:1:326:3 | Foo |
| tst.js:328:1:328:18 | /** @return {T} */ | tst.js:329:1:329:3 | Foo |
| tst.js:331:1:335:3 | /**\\n * ... r>}\\n */ | tst.js:336:1:336:7 | FooImpl |
| tst.js:336:27:336:72 | // Erro ... e twice | tst.js:343:1:343:8 | identity |
| tst.js:338:1:342:3 | /**\\n * ... e T\\n */ | tst.js:343:1:343:8 | identity |
| tst.js:345:1:345:21 | /** @ty ... ing} */ | tst.js:345:23:345:25 | var |
| tst.js:345:72:345:76 | // OK | tst.js:346:23:346:25 | var |
| tst.js:346:1:346:21 | /** @ty ... ber} */ | tst.js:346:23:346:25 | var |
| tst.js:346:60:346:64 | // OK | tst.js:347:23:347:25 | var |
| tst.js:347:1:347:21 | /** @ty ... ber} */ | tst.js:347:23:347:25 | var |
| tst.js:347:62:347:77 | // Type mismatch | tst.js:349:33:349:35 | var |
| tst.js:349:1:349:31 | /** @ty ... ned} */ | tst.js:349:33:349:35 | var |
| tst.js:351:1:353:3 | /**\\n * ... ger\\n */ | tst.js:354:1:354:8 | function |
| tst.js:356:1:359:3 | /**\\n * ... ion\\n */ | tst.js:360:1:360:8 | function |
| tst.js:363:3:365:5 | /**\\n ... p\\n */ | tst.js:366:3:366:15 | classicMethod |
| tst.js:368:3:370:5 | /**\\n ... p\\n */ | tst.js:371:3:371:13 | fancyMethod |
| tst.js:375:3:377:5 | /**\\n ... p\\n */ | tst.js:378:3:378:13 | constructor |
| tst.js:380:3:382:5 | /**\\n ... p\\n */ | tst.js:383:3:383:13 | classMethod |
| tst.js:386:1:389:3 | /**\\n * ... } x\\n */ | tst.js:390:1:390:8 | function |
test_JSDocTypeExpr
| tst.js:10:11:10:16 | string | tst.js:10:4:10:8 | @type | 0 |
| tst.js:23:14:23:20 | boolean | tst.js:23:5:23:11 | @define | 0 |
| tst.js:26:14:26:20 | boolean | tst.js:26:5:26:11 | @define | 0 |
| tst.js:31:13:31:19 | boolean | tst.js:31:4:31:10 | @return | 0 |
| tst.js:53:11:53:16 | number | tst.js:53:4:53:8 | @enum | 0 |
| tst.js:68:14:68:34 | goog.ds.BasicNodeList | tst.js:68:4:68:11 | @extends | 0 |
| tst.js:95:17:95:21 | Shape | tst.js:95:4:95:14 | @implements | 0 |
| tst.js:110:14:110:18 | Shape | tst.js:110:4:110:11 | @extends | 0 |
| tst.js:134:13:134:18 | Object | tst.js:134:4:134:10 | @return | 0 |
| tst.js:142:12:142:17 | number | tst.js:142:4:142:9 | @param | 0 |
| tst.js:143:12:143:17 | string | tst.js:143:12:143:29 | (string\|number\|null) | 0 |
| tst.js:143:12:143:29 | (string\|number\|null) | tst.js:143:4:143:9 | @param | 0 |
| tst.js:143:19:143:24 | number | tst.js:143:12:143:29 | (string\|number\|null) | 1 |
| tst.js:143:26:143:29 | null | tst.js:143:12:143:29 | (string\|number\|null) | 2 |
| tst.js:155:11:155:18 | Function | tst.js:155:11:155:20 | Array.<Function> | 0 |
| tst.js:155:11:155:20 | Array | tst.js:155:11:155:20 | Array.<Function> | -1 |
| tst.js:155:11:155:20 | Array.<Function> | tst.js:155:4:155:8 | @type | 0 |
| tst.js:163:12:163:18 | Element | tst.js:163:4:163:9 | @param | 0 |
| tst.js:171:13:171:18 | string | tst.js:171:4:171:10 | @return | 0 |
| tst.js:199:21:199:27 | Element | tst.js:199:12:199:18 | @return | 0 |
| tst.js:206:13:206:24 | DOMException | tst.js:206:4:206:10 | @throws | 0 |
| tst.js:212:11:212:16 | string | tst.js:212:4:212:8 | @type | 0 |
| tst.js:216:15:216:29 | (string\|number) | tst.js:216:5:216:12 | @typedef | 0 |
| tst.js:216:16:216:21 | string | tst.js:216:15:216:29 | (string\|number) | 0 |
| tst.js:216:23:216:28 | number | tst.js:216:15:216:29 | (string\|number) | 1 |
| tst.js:219:13:219:27 | goog.NumberLike | tst.js:219:5:219:10 | @param | 0 |
| tst.js:223:12:223:36 | {myNum: number, myObject} | tst.js:223:5:223:9 | @type | 0 |
| tst.js:223:20:223:25 | number | tst.js:223:12:223:36 | {myNum: number, myObject} | 0 |
| tst.js:226:12:226:17 | number | tst.js:226:12:226:18 | number? | 0 |
| tst.js:226:12:226:18 | number? | tst.js:226:5:226:9 | @type | 0 |
| tst.js:229:12:229:18 | !Object | tst.js:229:5:229:9 | @type | 0 |
| tst.js:229:13:229:18 | Object | tst.js:229:12:229:18 | !Object | 0 |
| tst.js:233:12:233:36 | function (string, boolean) | tst.js:233:4:233:9 | @param | 0 |
| tst.js:233:21:233:26 | string | tst.js:233:12:233:36 | function (string, boolean) | 0 |
| tst.js:233:29:233:35 | boolean | tst.js:233:12:233:36 | function (string, boolean) | 1 |
| tst.js:234:12:234:29 | function (): number | tst.js:234:4:234:9 | @param | 0 |
| tst.js:234:24:234:29 | number | tst.js:234:12:234:29 | function (): number | -1 |
| tst.js:235:12:235:46 | function (this: goog.ui.Menu, string) | tst.js:235:4:235:9 | @param | 0 |
| tst.js:235:26:235:37 | goog.ui.Menu | tst.js:235:12:235:46 | function (this: goog.ui.Menu, string) | -2 |
| tst.js:235:40:235:45 | string | tst.js:235:12:235:46 | function (this: goog.ui.Menu, string) | 0 |
| tst.js:236:12:236:45 | function (new: goog.ui.Menu, string) | tst.js:236:4:236:9 | @param | 0 |
| tst.js:236:25:236:36 | goog.ui.Menu | tst.js:236:12:236:45 | function (new: goog.ui.Menu, string) | -2 |
| tst.js:236:39:236:44 | string | tst.js:236:12:236:45 | function (new: goog.ui.Menu, string) | 0 |
| tst.js:237:12:237:48 | function (string, ...[number]): number | tst.js:237:4:237:9 | @param | 0 |
| tst.js:237:21:237:26 | string | tst.js:237:12:237:48 | function (string, ...[number]): number | 0 |
| tst.js:237:32:237:39 | ...[number] | tst.js:237:12:237:48 | function (string, ...[number]): number | 1 |
| tst.js:237:32:237:39 | [number] | tst.js:237:32:237:39 | ...[number] | 0 |
| tst.js:237:33:237:38 | number | tst.js:237:32:237:39 | [number] | 0 |
| tst.js:237:43:237:48 | number | tst.js:237:12:237:48 | function (string, ...[number]): number | -1 |
| tst.js:238:12:238:20 | ...number | tst.js:238:4:238:9 | @param | 0 |
| tst.js:238:15:238:20 | number | tst.js:238:12:238:20 | ...number | 0 |
| tst.js:239:12:239:17 | number | tst.js:239:12:239:18 | number= | 0 |
| tst.js:239:12:239:18 | number= | tst.js:239:4:239:9 | @param | 0 |
| tst.js:240:12:240:38 | function (?string=, number=) | tst.js:240:4:240:9 | @param | 0 |
| tst.js:240:21:240:27 | ?string | tst.js:240:21:240:28 | ?string= | 0 |
| tst.js:240:21:240:28 | ?string= | tst.js:240:12:240:38 | function (?string=, number=) | 0 |
| tst.js:240:22:240:27 | string | tst.js:240:21:240:27 | ?string | 0 |
| tst.js:240:31:240:36 | number | tst.js:240:31:240:37 | number= | 0 |
| tst.js:240:31:240:37 | number= | tst.js:240:12:240:38 | function (?string=, number=) | 1 |
| tst.js:241:12:241:12 | * | tst.js:241:4:241:9 | @param | 0 |
| tst.js:242:12:242:12 | ? | tst.js:242:4:242:9 | @param | 0 |
| tst.js:252:14:252:14 | T | tst.js:252:5:252:11 | @return | 0 |
| tst.js:255:13:255:13 | T | tst.js:255:5:255:10 | @param | 0 |
| tst.js:258:12:258:24 | !Foo.<string> | tst.js:258:5:258:9 | @type | 0 |
| tst.js:258:13:258:15 | Foo | tst.js:258:13:258:24 | Foo.<string> | -1 |
| tst.js:258:13:258:24 | Foo.<string> | tst.js:258:12:258:24 | !Foo.<string> | 0 |
| tst.js:258:18:258:23 | string | tst.js:258:13:258:24 | Foo.<string> | 0 |
| tst.js:259:22:259:34 | !Foo.<string> | tst.js:259:15:259:19 | @type | 0 |
| tst.js:259:23:259:25 | Foo | tst.js:259:23:259:34 | Foo.<string> | -1 |
| tst.js:259:23:259:34 | Foo.<string> | tst.js:259:22:259:34 | !Foo.<string> | 0 |
| tst.js:259:28:259:33 | string | tst.js:259:23:259:34 | Foo.<string> | 0 |
| tst.js:262:12:262:12 | T | tst.js:262:4:262:9 | @param | 0 |
| tst.js:275:12:275:16 | MyMap | tst.js:275:12:275:33 | MyMap.<string, number> | -1 |
| tst.js:275:12:275:33 | MyMap.<string, number> | tst.js:275:5:275:9 | @type | 0 |
| tst.js:275:19:275:24 | string | tst.js:275:12:275:33 | MyMap.<string, number> | 0 |
| tst.js:275:27:275:32 | number | tst.js:275:12:275:33 | MyMap.<string, number> | 1 |
| tst.js:283:14:283:14 | X | tst.js:283:4:283:11 | @extends | 0 |
| tst.js:288:12:288:14 | Foo | tst.js:288:12:288:18 | Foo.<X> | -1 |
| tst.js:288:12:288:18 | Foo.<X> | tst.js:288:5:288:9 | @type | 0 |
| tst.js:288:17:288:17 | X | tst.js:288:12:288:18 | Foo.<X> | 0 |
| tst.js:289:12:289:14 | Foo | tst.js:289:12:289:18 | Foo.<Y> | -1 |
| tst.js:289:12:289:18 | Foo.<Y> | tst.js:289:5:289:9 | @type | 0 |
| tst.js:289:17:289:17 | Y | tst.js:289:12:289:18 | Foo.<Y> | 0 |
| tst.js:294:13:294:15 | Foo | tst.js:294:13:294:19 | Foo.<Y> | -1 |
| tst.js:294:13:294:19 | Foo.<Y> | tst.js:294:5:294:10 | @param | 0 |
| tst.js:294:18:294:18 | Y | tst.js:294:13:294:19 | Foo.<Y> | 0 |
| tst.js:306:13:306:13 | T | tst.js:306:5:306:10 | @param | 0 |
| tst.js:311:14:311:14 | A | tst.js:311:14:311:23 | A.<string> | -1 |
| tst.js:311:14:311:23 | A.<string> | tst.js:311:4:311:11 | @extends | 0 |
| tst.js:311:17:311:22 | string | tst.js:311:14:311:23 | A.<string> | 0 |
| tst.js:318:14:318:14 | A | tst.js:318:14:318:18 | A.<U> | -1 |
| tst.js:318:14:318:18 | A.<U> | tst.js:318:4:318:11 | @extends | 0 |
| tst.js:318:17:318:17 | U | tst.js:318:14:318:18 | A.<U> | 0 |
| tst.js:328:14:328:14 | T | tst.js:328:5:328:11 | @return | 0 |
| tst.js:333:17:333:19 | Foo | tst.js:333:17:333:28 | Foo.<string> | -1 |
| tst.js:333:17:333:28 | Foo.<string> | tst.js:333:4:333:14 | @implements | 0 |
| tst.js:333:22:333:27 | string | tst.js:333:17:333:28 | Foo.<string> | 0 |
| tst.js:334:17:334:19 | Foo | tst.js:334:17:334:28 | Foo.<number> | -1 |
| tst.js:334:17:334:28 | Foo.<number> | tst.js:334:4:334:14 | @implements | 0 |
| tst.js:334:22:334:27 | number | tst.js:334:17:334:28 | Foo.<number> | 0 |
| tst.js:339:12:339:12 | T | tst.js:339:4:339:9 | @param | 0 |
| tst.js:340:13:340:13 | T | tst.js:340:4:340:10 | @return | 0 |
| tst.js:345:12:345:17 | string | tst.js:345:5:345:9 | @type | 0 |
| tst.js:346:12:346:17 | number | tst.js:346:5:346:9 | @type | 0 |
| tst.js:347:12:347:17 | number | tst.js:347:5:347:9 | @type | 0 |
| tst.js:349:12:349:17 | string | tst.js:349:12:349:27 | (string\|undefined) | 0 |
| tst.js:349:12:349:27 | (string\|undefined) | tst.js:349:5:349:9 | @type | 0 |
| tst.js:349:19:349:27 | undefined | tst.js:349:12:349:27 | (string\|undefined) | 1 |
| tst.js:357:12:357:16 | Array | tst.js:357:12:357:25 | Array.<number> | -1 |
| tst.js:357:12:357:25 | Array.<number> | tst.js:357:4:357:9 | @param | 0 |
| tst.js:357:19:357:24 | number | tst.js:357:12:357:25 | Array.<number> | 0 |
| tst.js:358:12:358:48 | function (x: !number, y: !number): number | tst.js:358:4:358:9 | @param | 0 |
| tst.js:358:23:358:29 | !number | tst.js:358:12:358:48 | function (x: !number, y: !number): number | 0 |
| tst.js:358:24:358:29 | number | tst.js:358:23:358:29 | !number | 0 |
| tst.js:358:34:358:40 | !number | tst.js:358:12:358:48 | function (x: !number, y: !number): number | 1 |
| tst.js:358:35:358:40 | number | tst.js:358:34:358:40 | !number | 0 |
| tst.js:358:43:358:48 | number | tst.js:358:12:358:48 | function (x: !number, y: !number): number | -1 |
| tst.js:364:14:364:15 | T1 | tst.js:364:6:364:11 | @param | 0 |
| tst.js:369:14:369:15 | T2 | tst.js:369:6:369:11 | @param | 0 |
| tst.js:376:14:376:15 | T3 | tst.js:376:6:376:11 | @param | 0 |
| tst.js:381:14:381:15 | T4 | tst.js:381:6:381:11 | @param | 0 |
| tst.js:387:12:387:16 | Array | tst.js:387:12:388:13 | Array.<number> | -1 |
| tst.js:387:12:388:13 | Array.<number> | tst.js:387:4:387:9 | @param | 0 |
| tst.js:388:7:388:12 | number | tst.js:387:12:388:13 | Array.<number> | 0 |
test_JSDocOptionalParameterTypeExpr
| tst.js:239:12:239:18 | number= | tst.js:239:12:239:17 | number |
| tst.js:240:21:240:28 | ?string= | tst.js:240:21:240:27 | ?string |
| tst.js:240:31:240:37 | number= | tst.js:240:31:240:36 | number |
test_getParameterTag
| tst.js:146:37:146:44 | groupNum | groupNum | tst.js:142:4:142:9 | @param | groupNum | tst.js:142:12:142:17 | number |
| tst.js:146:47:146:50 | term | term | tst.js:143:4:143:9 | @param | term | tst.js:143:12:143:29 | (string\|number\|null) |
| tst.js:166:59:166:65 | element | element | tst.js:163:4:163:9 | @param | element | tst.js:163:12:163:18 | Element |
| tst.js:220:28:220:28 | x | x | tst.js:219:5:219:10 | @param | x | tst.js:219:13:219:27 | goog.NumberLike |
| tst.js:256:30:256:30 | t | t | tst.js:255:5:255:10 | @param | t | tst.js:255:13:255:13 | T |
| tst.js:266:16:266:16 | t | t | tst.js:262:4:262:9 | @param | t | tst.js:262:12:262:12 | T |
| tst.js:295:22:295:25 | fooY | fooY | tst.js:294:5:294:10 | @param | fooY | tst.js:294:13:294:19 | Foo.<Y> |
| tst.js:307:31:307:31 | t | t | tst.js:306:5:306:10 | @param | t | tst.js:306:13:306:13 | T |
| tst.js:343:21:343:21 | a | a | tst.js:339:4:339:9 | @param | a | tst.js:339:12:339:12 | T |
| tst.js:360:15:360:19 | array | array | tst.js:357:4:357:9 | @param | array | tst.js:357:12:357:25 | Array.<number> |
| tst.js:360:22:360:23 | fn | fn | tst.js:358:4:358:9 | @param | fn | tst.js:358:12:358:48 | function (x: !number, y: !number): number |
| tst.js:366:27:366:27 | p | p | tst.js:364:6:364:11 | @param | p | tst.js:364:14:364:15 | T1 |
| tst.js:371:15:371:15 | p | p | tst.js:369:6:369:11 | @param | p | tst.js:369:14:369:15 | T2 |
| tst.js:378:15:378:15 | p | p | tst.js:376:6:376:11 | @param | p | tst.js:376:14:376:15 | T3 |
| tst.js:383:15:383:15 | p | p | tst.js:381:6:381:11 | @param | p | tst.js:381:14:381:15 | T4 |
| tst.js:390:20:390:20 | x | x | tst.js:387:4:387:9 | @param | x | tst.js:387:12:388:13 | Array.<number> |
test_JSDocAppliedTypeExpr
| tst.js:155:11:155:20 | Array.<Function> | tst.js:155:11:155:20 | Array | 0 | tst.js:155:11:155:18 | Function |
| tst.js:258:13:258:24 | Foo.<string> | tst.js:258:13:258:15 | Foo | 0 | tst.js:258:18:258:23 | string |
| tst.js:259:23:259:34 | Foo.<string> | tst.js:259:23:259:25 | Foo | 0 | tst.js:259:28:259:33 | string |
| tst.js:275:12:275:33 | MyMap.<string, number> | tst.js:275:12:275:16 | MyMap | 0 | tst.js:275:19:275:24 | string |
| tst.js:275:12:275:33 | MyMap.<string, number> | tst.js:275:12:275:16 | MyMap | 1 | tst.js:275:27:275:32 | number |
| tst.js:288:12:288:18 | Foo.<X> | tst.js:288:12:288:14 | Foo | 0 | tst.js:288:17:288:17 | X |
| tst.js:289:12:289:18 | Foo.<Y> | tst.js:289:12:289:14 | Foo | 0 | tst.js:289:17:289:17 | Y |
| tst.js:294:13:294:19 | Foo.<Y> | tst.js:294:13:294:15 | Foo | 0 | tst.js:294:18:294:18 | Y |
| tst.js:311:14:311:23 | A.<string> | tst.js:311:14:311:14 | A | 0 | tst.js:311:17:311:22 | string |
| tst.js:318:14:318:18 | A.<U> | tst.js:318:14:318:14 | A | 0 | tst.js:318:17:318:17 | U |
| tst.js:333:17:333:28 | Foo.<string> | tst.js:333:17:333:19 | Foo | 0 | tst.js:333:22:333:27 | string |
| tst.js:334:17:334:28 | Foo.<number> | tst.js:334:17:334:19 | Foo | 0 | tst.js:334:22:334:27 | number |
| tst.js:357:12:357:25 | Array.<number> | tst.js:357:12:357:16 | Array | 0 | tst.js:357:19:357:24 | number |
| tst.js:387:12:388:13 | Array.<number> | tst.js:387:12:387:16 | Array | 0 | tst.js:388:7:388:12 | number |
test_JSDocNonNullableTypeExpr
| tst.js:229:12:229:18 | !Object | tst.js:229:13:229:18 | Object | prefix |
| tst.js:258:12:258:24 | !Foo.<string> | tst.js:258:13:258:24 | Foo.<string> | prefix |
| tst.js:259:22:259:34 | !Foo.<string> | tst.js:259:23:259:34 | Foo.<string> | prefix |
| tst.js:358:23:358:29 | !number | tst.js:358:24:358:29 | number | prefix |
| tst.js:358:34:358:40 | !number | tst.js:358:35:358:40 | number | prefix |
test_ParExpr_getDocumentation
| tst.js:117:42:119:10 | ({\\n ... }) | tst.js:117:9:117:40 | /** @le ... ype} */ |
| tst.js:259:40:259:50 | (new Foo()) | tst.js:259:11:259:38 | /** @ty ... ng>} */ |

View File

@@ -0,0 +1,67 @@
typeModel
| (aliases).Alias1 | (aliases) | Member[Alias1] |
| (aliases).Alias1 | (aliases) | Member[Alias2] |
| (aliases).Alias1 | (aliases) | Member[Alias3].Member[x] |
| (aliases).Alias1 | (aliases) | Member[Alias4].Member[x].Member[x] |
| (aliases).Alias1 | (aliases) | Member[AliasedClass] |
| (aliases).Alias1.prototype | (aliases).Alias1 | Instance |
| (aliases).Alias1.prototype | (aliases).Alias1.prototype.foo | ReturnValue |
| (aliases).Alias1.prototype.foo | (aliases).Alias1.prototype | Member[foo] |
| (long-access-path).a.shortcut.d | (long-access-path) | Member[a].Member[b].Member[c].Member[d] |
| (long-access-path).a.shortcut.d | (long-access-path) | Member[a].Member[shortcut].Member[d] |
| (long-access-path).a.shortcut.d.e | (long-access-path).a.shortcut.d | Member[e] |
| (reexport).func | (reexport) | Member[func] |
| (return-this).FluentInterface | (return-this) | Member[FluentInterface] |
| (return-this).FluentInterface.prototype | (return-this).FluentInterface | Instance |
| (return-this).FluentInterface.prototype | (return-this).FluentInterface.prototype.bar | ReturnValue |
| (return-this).FluentInterface.prototype | (return-this).FluentInterface.prototype.baz | ReturnValue |
| (return-this).FluentInterface.prototype | (return-this).FluentInterface.prototype.foo | ReturnValue |
| (return-this).FluentInterface.prototype.bar | (return-this).FluentInterface.prototype | Member[bar] |
| (return-this).FluentInterface.prototype.baz | (return-this).FluentInterface.prototype | Member[baz] |
| (return-this).FluentInterface.prototype.foo | (return-this).FluentInterface.prototype | Member[foo] |
| (return-this).FluentInterface.prototype.notFluent | (return-this).FluentInterface.prototype | Member[notFluent] |
| (return-this).FluentInterface.prototype.notFluent2 | (return-this).FluentInterface.prototype | Member[notFluent2] |
| (root-function).PublicClass | (root-function) | Member[PublicClass] |
| (root-function).PublicClass.prototype | (root-function) | ReturnValue |
| (root-function).PublicClass.prototype | (root-function).PublicClass | Instance |
| (root-function).PublicClass.prototype.method | (root-function).PublicClass.prototype | Member[method] |
| (semi-internal-class).PublicClass | (semi-internal-class) | Member[PublicClass] |
| (semi-internal-class).PublicClass.prototype | (semi-internal-class).PublicClass | Instance |
| (semi-internal-class).PublicClass.prototype | (semi-internal-class).SemiInternalClass.prototype.method | ReturnValue |
| (semi-internal-class).PublicClass.prototype | (semi-internal-class).getAnonymous~expr2 | ReturnValue |
| (semi-internal-class).PublicClass.prototype.publicMethod | (semi-internal-class).PublicClass.prototype | Member[publicMethod] |
| (semi-internal-class).SemiInternalClass.prototype | (semi-internal-class).get | ReturnValue |
| (semi-internal-class).SemiInternalClass.prototype.method | (semi-internal-class).SemiInternalClass.prototype | Member[method] |
| (semi-internal-class).get | (semi-internal-class) | Member[get] |
| (semi-internal-class).getAnonymous | (semi-internal-class) | Member[getAnonymous] |
| (semi-internal-class).getAnonymous~expr1 | (semi-internal-class).getAnonymous | ReturnValue |
| (semi-internal-class).getAnonymous~expr2 | (semi-internal-class).getAnonymous~expr1 | Member[method] |
| (subclass).A | (subclass) | Member[A] |
| (subclass).A.prototype | (subclass).A | Instance |
| (subclass).A.prototype | (subclass).B.prototype | |
| (subclass).A.prototype | (subclass).ExposedMidSubClass.prototype~expr1 | |
| (subclass).A.prototype.a | (subclass).A.prototype | Member[a] |
| (subclass).B | (subclass) | Member[B] |
| (subclass).B.prototype | (subclass).B | Instance |
| (subclass).B.prototype | (subclass).C.prototype | |
| (subclass).B.prototype.b | (subclass).B.prototype | Member[b] |
| (subclass).C | (subclass) | Member[C] |
| (subclass).C.prototype | (subclass).C | Instance |
| (subclass).C.prototype.c | (subclass).C.prototype | Member[c] |
| (subclass).D | (subclass) | Member[D] |
| (subclass).D.prototype | (subclass).D | Instance |
| (subclass).D.prototype.d | (subclass).D.prototype | Member[d] |
| (subclass).ExposedMidSubClass | (subclass) | Member[ExposedMidSubClass] |
| (subclass).ExposedMidSubClass.prototype | (subclass).ExposedMidSubClass | Instance |
| (subclass).ExposedMidSubClass.prototype.m | (subclass).ExposedMidSubClass.prototype | Member[m] |
| (subclass).ExposedMidSubClass.prototype~expr1 | (subclass).ExposedMidSubClass.prototype | |
| upstream-lib | (reexport) | Member[lib] |
| upstream-lib | (reexport).func | ReturnValue |
| upstream-lib.Type | (subclass).D.prototype | |
| upstream-lib.XYZ | (reexport) | Member[x].Member[y].Member[z] |
| upstream-lib.XYZ | (reexport) | Member[xy].Member[z] |
summaryModel
| (aliases).Alias1.prototype | | | Member[foo].ReturnValue | type |
| (return-this).FluentInterface.prototype | | | Member[bar].ReturnValue | type |
| (return-this).FluentInterface.prototype | | | Member[baz].ReturnValue | type |
| (return-this).FluentInterface.prototype | | | Member[foo].ReturnValue | type |

View File

@@ -0,0 +1,7 @@
extensions:
- addsTo:
pack: codeql/javascript-all
extensible: typeModel
data:
- ["upstream-lib.XYZ", "upstream-lib", "Member[x].Member[y].Member[z]"]
- ["upstream-lib.Type", "upstream-lib", "Member[Type].Instance"]

View File

@@ -0,0 +1,19 @@
private import javascript
private import semmle.javascript.endpoints.EndpointNaming as EndpointNaming
private import semmle.javascript.frameworks.data.internal.ApiGraphModels as Shared
module ModelExportConfig implements ModelExportSig {
predicate shouldContain(API::Node node) {
node.getAValueReachingSink() instanceof DataFlow::FunctionNode
}
predicate mustBeNamed(API::Node node) { shouldContain(node) }
predicate shouldContainType(string type) { Shared::isRelevantType(type) }
}
module Exported = ModelExport<ModelExportConfig>;
query predicate typeModel = Exported::typeModel/3;
query predicate summaryModel = Exported::summaryModel/5;

View File

@@ -0,0 +1,9 @@
export class AliasedClass {
foo() { return this; }
}
export const Alias1 = AliasedClass;
export const Alias2 = AliasedClass;
export const Alias3 = { x: AliasedClass };
export const Alias4 = { x: Alias3 };

View File

@@ -0,0 +1,4 @@
{
"name": "aliases",
"main": "aliases.js"
}

View File

@@ -0,0 +1,11 @@
export const a = {
b: {
c: {
d: {
e: function() {}
}
}
}
};
a.shortcut = a.b.c;

View File

@@ -0,0 +1,4 @@
{
"name": "long-access-path",
"main": "long-access-path.js"
}

View File

@@ -0,0 +1,4 @@
{
"name": "reexport",
"main": "reexport.js"
}

Some files were not shown because too many files have changed in this diff Show More