QL code and tests for C#/C++/JavaScript.

This commit is contained in:
Pavel Avgustinov
2018-08-02 17:53:23 +01:00
commit b55526aa58
10684 changed files with 581163 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
| tst.html:5:17:5:33 | src=external.js | tst.html:5:9:5:43 | <script>...</> | src | external.js |
| tst.html:10:11:10:16 | ng-app= | tst.html:10:5:12:11 | <body>...</> | ng-app | |
| tst.html:11:12:11:49 | href=javascript:void(alert('Nope!')) | tst.html:11:9:11:64 | <a>...</> | href | javascript:void(alert('Nope!')) |

View File

@@ -0,0 +1,4 @@
import javascript
from HTML::Attribute a
select a, a.getElement(), a.getName(), a.getValue()

View File

@@ -0,0 +1,3 @@
| tst.html:5:9:5:43 | <script>...</> | 0 | tst.html:5:17:5:33 | src=external.js |
| tst.html:10:5:12:11 | <body>...</> | 0 | tst.html:10:11:10:16 | ng-app= |
| tst.html:11:9:11:64 | <a>...</> | 0 | tst.html:11:12:11:49 | href=javascript:void(alert('Nope!')) |

View File

@@ -0,0 +1,4 @@
import javascript
from HTML::Element elt, int i
select elt, i, elt.getAttribute(i)

View File

@@ -0,0 +1,6 @@
| tst.html:2:1:13:7 | <html>...</> | 0 | tst.html:3:5:9:11 | <head>...</> |
| tst.html:2:1:13:7 | <html>...</> | 1 | tst.html:10:5:12:11 | <body>...</> |
| tst.html:3:5:9:11 | <head>...</> | 0 | tst.html:4:9:4:32 | <title>...</> |
| tst.html:3:5:9:11 | <head>...</> | 1 | tst.html:5:9:5:43 | <script>...</> |
| tst.html:3:5:9:11 | <head>...</> | 2 | tst.html:6:9:8:17 | <script>...</> |
| tst.html:10:5:12:11 | <body>...</> | 0 | tst.html:11:9:11:64 | <a>...</> |

View File

@@ -0,0 +1,4 @@
import javascript
from HTML::Element elt, int i
select elt, i, elt.getChild(i)

View File

@@ -0,0 +1,7 @@
| tst.html:2:1:13:7 | <html>...</> | html |
| tst.html:3:5:9:11 | <head>...</> | head |
| tst.html:4:9:4:32 | <title>...</> | title |
| tst.html:5:9:5:43 | <script>...</> | script |
| tst.html:6:9:8:17 | <script>...</> | script |
| tst.html:10:5:12:11 | <body>...</> | body |
| tst.html:11:9:11:64 | <a>...</> | a |

View File

@@ -0,0 +1,4 @@
import javascript
from HTML::Element elt
select elt, elt.getName()

View File

@@ -0,0 +1,6 @@
| tst.html:3:5:9:11 | <head>...</> | tst.html:2:1:13:7 | <html>...</> |
| tst.html:4:9:4:32 | <title>...</> | tst.html:3:5:9:11 | <head>...</> |
| tst.html:5:9:5:43 | <script>...</> | tst.html:3:5:9:11 | <head>...</> |
| tst.html:6:9:8:17 | <script>...</> | tst.html:3:5:9:11 | <head>...</> |
| tst.html:10:5:12:11 | <body>...</> | tst.html:2:1:13:7 | <html>...</> |
| tst.html:11:9:11:64 | <a>...</> | tst.html:10:5:12:11 | <body>...</> |

View File

@@ -0,0 +1,4 @@
import javascript
from HTML::Element elt
select elt, elt.getParent()

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>Test page</title>
<script src="external.js"></script>
<script>
alert("Hello, world!");
</script>
</head>
<body ng-app>
<A href="javascript:void(alert('Nope!'))">click here</a>
</body>
</html>