mmir.parser.ParserUtils
A Utility class for parsing (eHTML) templates.
Utility functions for parsing templates (and template elements, e.g. JS-parts of template expressions)
Utility functions for parsing templates (and template elements, e.g. JS-parts of template expressions)
Example
mmir.require('mmirf/parseUtils').parse(str, view)
Methods
-
parse(rawTemplateString, view){mmir.parser.ParsingResult}
-
Parse a text as view template (e.g. *.ehtml files).
Name Type Description rawTemplateStringString the text that should be parsed viewObject optional (optional) the view to which the rawTemplateString belongs (only used for error messages) Returns:
Type Description mmir.parser.ParsingResult the parsing result -
parseJS(rawTemplateString, parseEntryRuleName, view){mmir.parser.ParsingResult}
-
Parse a text as JavaScript.
Name Type Description rawTemplateStringString the text that should be parsed parseEntryRuleNameString optional (optional) specifies the JavaScript element that should be parsed for viewObject optional (optional) the view to which the rawTemplateString belongs (only used for error messages) Returns:
Type Description mmir.parser.ParsingResult the parsing result