| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>Doctrine trying</title> |
| 6 |
<script src="../doctrine.js"></script> |
| 7 |
<script type="text/javascript"> |
| 8 |
window.onload = function() { |
| 9 |
document.getElementById("doit").onclick = function() { |
| 10 |
var res = doctrine.parseParamType(document.getElementById("commenttext").value, |
| 11 |
{unwrap:true, recoverable:true} ); |
| 12 |
|
| 13 |
document.getElementById("parse_tree_res").innerHTML = JSON.stringify(res, null, ' '); |
| 14 |
document.getElementById("stringify_res").textContent = doctrine.stringify(res); |
| 15 |
}; |
| 16 |
}; |
| 17 |
</script> |
| 18 |
</head> |
| 19 |
<body> |
| 20 |
<textarea id="commenttext">Add a jsdoc comment here</textarea> |
| 21 |
<br/> |
| 22 |
<br/> |
| 23 |
<button id="doit">Click to parse</button> |
| 24 |
<br/> |
| 25 |
<br/> |
| 26 |
<h3>Parse Tree</h3> |
| 27 |
<pre id="parse_tree_res" ></pre> |
| 28 |
<h3>Stringified</h3> |
| 29 |
<pre id="stringify_res" ></pre> |
| 30 |
</body> |
| 31 |
</html> |