| ... | @@ -32,6 +32,7 @@ | ... | @@ -32,6 +32,7 @@ |
| 32 | var typeKindPtrId; | 32 | var typeKindPtrId; |
| 33 | var typeKindFloatId; | 33 | var typeKindFloatId; |
| 34 | var typeKindIntId; | 34 | var typeKindIntId; |
| | 35 | var typeKindBoolId; |
| 35 | findTypeKinds(); | 36 | findTypeKinds(); |
| 36 | | 37 | |
| 37 | // for each package, is an array with packages to get to this one | 38 | // for each package, is an array with packages to get to this one |
| ... | @@ -214,7 +215,7 @@ | ... | @@ -214,7 +215,7 @@ |
| 214 | } | 215 | } |
| 215 | | 216 | |
| 216 | var protoSrcNode = zigAnalysis.astNodes[protoSrcIndex]; | 217 | var protoSrcNode = zigAnalysis.astNodes[protoSrcIndex]; |
| 217 | if (docsSource == null && protoSrcNode.docs != null) { | 218 | if (docsSource == null && protoSrcNode != null && protoSrcNode.docs != null) { |
| 218 | docsSource = protoSrcNode.docs; | 219 | docsSource = protoSrcNode.docs; |
| 219 | } | 220 | } |
| 220 | if (docsSource != null) { | 221 | if (docsSource != null) { |
| ... | @@ -422,6 +423,12 @@ | ... | @@ -422,6 +423,12 @@ |
| 422 | } else { | 423 | } else { |
| 423 | return "type"; | 424 | return "type"; |
| 424 | } | 425 | } |
| | 426 | case typeKindBoolId: |
| | 427 | if (wantHtml) { |
| | 428 | return '<span class="tok-type">bool</span>'; |
| | 429 | } else { |
| | 430 | return "bool"; |
| | 431 | } |
| 425 | default: | 432 | default: |
| 426 | if (wantHtml) { | 433 | if (wantHtml) { |
| 427 | return escapeHtml(typeObj.name); | 434 | return escapeHtml(typeObj.name); |
| ... | @@ -534,6 +541,8 @@ | ... | @@ -534,6 +541,8 @@ |
| 534 | typeKindFloatId = i; | 541 | typeKindFloatId = i; |
| 535 | } else if (zigAnalysis.typeKinds[i] === "Int") { | 542 | } else if (zigAnalysis.typeKinds[i] === "Int") { |
| 536 | typeKindIntId = i; | 543 | typeKindIntId = i; |
| | 544 | } else if (zigAnalysis.typeKinds[i] === "Bool") { |
| | 545 | typeKindBoolId = i; |
| 537 | } | 546 | } |
| 538 | } | 547 | } |
| 539 | if (typeKindTypeId == null) { | 548 | if (typeKindTypeId == null) { |
| ... | @@ -551,6 +560,9 @@ | ... | @@ -551,6 +560,9 @@ |
| 551 | if (typeKindIntId == null) { | 560 | if (typeKindIntId == null) { |
| 552 | throw new Error("No type kind 'Int' found"); | 561 | throw new Error("No type kind 'Int' found"); |
| 553 | } | 562 | } |
| | 563 | if (typeKindBoolId == null) { |
| | 564 | throw new Error("No type kind 'Bool' found"); |
| | 565 | } |
| 554 | } | 566 | } |
| 555 | | 567 | |
| 556 | function findTypeTypeId() { | 568 | function findTypeTypeId() { |