JHSParser
MMO\doc\js · 1 symbol · generated 30 Sep 2026
JHSParser
JHSParser.php:26Extracts documentation from a .jhs file -- mmo.client's one-file format holding an element's markup, its javascript class and its styles together (JHSCompiler).
- Namespace
MMO\doc\js- Extends
- Parser
Index
| language | ||
| parse($source, $filename) | ||
| parseScript($script, $filename, $line) | Parse one <script> block as javascript, shifting every line number by where the block starts in the .jhs file. | |
| readRootTag($source) | Read the file's root tag: its name, its attributes, and where it starts. | |
| readScripts($source) | ||
| readSlots($source) | ||
| rootSignature($tag, $attributes, $isView) | ||
| taggedDescriptions($comment, $tag) | Read a @tag name - description family into a name => description map -- the shape @attr, @css and @slot share (JHSCompiler::extractJSDoc, which reads the very same tags). |
Properties1
language
- Type
- string
Methods7
parse($source, $filename)
JHSParser.php:34parseScript($script, $filename, $line)
JHSParser.php:150Parse one <script> block as javascript, shifting every line number by where the block starts in the .jhs file.
readRootTag($source)
JHSParser.php:168Read the file's root tag: its name, its attributes, and where it starts.
readScripts($source)
JHSParser.php:190readSlots($source)
JHSParser.php:201rootSignature($tag, $attributes, $isView)
JHSParser.php:234taggedDescriptions($comment, $tag)
JHSParser.php:216Read a @tag name - description family into a name => description map -- the shape @attr, @css and @slot share (JHSCompiler::extractJSDoc, which reads the very same tags).
| $comment | DocComment | |
| $tag | string | |
| returns | array |
Inherited members (51)
| Properties | Declared by | Description | |
|---|---|---|---|
comments | Parser | ||
count | Parser | ||
filename | Parser | ||
provides | Parser | ||
source | Parser | ||
symbols | Parser | ||
tokens | Parser |
| Methods | Declared by | Description | |
|---|---|---|---|
accessorSignature($name, $getter, $setter, $modifiers) | Parser | ||
comment($doc) | Parser | ||
continuesExpression($i) | Parser | ||
endsOpen($i) | Parser | ||
examplesOf($comment) | Parser | ||
fieldSignature($name, $value, $modifiers) | Parser | ||
getProvides() | Parser | ||
isArrowHeader($i) | Parser | ||
isOpening($i) | Parser | ||
lineCommentsDoc($texts, $first, $i, $line, $doc) | Parser | Turn a kept run of // lines into a doc-comment-shaped token, or give the pending one back when there is nothing worth keeping. | |
looksLikeConstant($name) | Parser | ||
matchBracket($i) | Parser | ||
mergeAccessors($members) | Parser | Fold each get x()/set x() pair into the single property it really is, the way a reader thinks of it -- with the getter's own doc comment and @return {T} type (a setter's jsdoc is discarde… | |
methodSignature($name, $params, $modifiers) | Parser | ||
newMember($kind, $name, $comment, $line, $modifiers, $owner) | Parser | ||
newSymbol($kind, $name, $doc, $line) | Parser | ||
paramTag($comment, $name) | Parser | ||
parseAssignment($start, $name, $i, $doc) | Parser | Parse <name> = <value> once the left-hand side is known, and turn the right-hand side into the matching kind of symbol. | |
parseClass($i, $name, $doc) | Parser | ||
parseFile($filename) | Parser | ||
parseFunction($i, $name, $doc, $async) | Parser | ||
parseMembers($i, $end, $owner) | Parser | Parse a class body or an object literal into members. | |
parseParam($from, $to, $comment) | Parser | ||
parseParams($i, $end, $comment) | Parser | Split a parameter list into DocParam, merging in whatever the jsdoc @param tags say about each one. | |
parseStatement($i, $doc) | Parser | Parse one top-level statement, registering whatever symbol it declares. | |
readLineComments($i, $doc) | Parser | Collect a run of consecutive // lines as a doc comment, so constants documented that way are not lost. | |
readPath($i) | Parser | Read a dotted path (MMO.core.Map) starting at $i. | |
reference($name) | Parser | ||
register($symbol) | Parser | Register a symbol, merging it into a same-named one already found (a class re-opened, a namespace extended). | |
returnOf($comment) | Parser | ||
skipArrowHeader($i) | Parser | ||
skipSemicolon($i) | Parser | ||
skipStatement($i) | Parser | ||
split($name) | Parser | A symbol declared under an already-known namespace object becomes one of its members instead of a page of its own -- that is what makes MMO.core.strings.bytesize show up on the MMO.core.strings… | |
statementEnd($i, $limit) | Parser | Find where a statement (or an object-literal entry) ends: the first ; or , at depth 0, the first token on a new line when nothing is left open (javascript's automatic semicolon insertion), or $… | |
stringAt($i) | Parser | ||
StripBanner($text) | Parser | Drop the section banners this codebase draws with comments, which would otherwise be read as the documentation of whatever follows them -- and, worse, turn into setext <h1>s once rendered as mark… | |
tagsOf($comment) | Parser | Every doc tag that is not already rendered as a first-class part of the model, kept in source order so the page can show @see, @deprecated, @todo, @since, @author... | |
tagType($tag) | Parser | ||
text($from, $to) | Parser | ||
throwsOf($comment) | Parser | ||
type($text) | Parser | Build a DocType from a jsdoc type expression ({number|string}, {Array<MMO.core.Map>}). | |
typeAt($i) | Parser | ||
value($i) | Parser |