new mmir.parser.ParserUtils()
Utility functions for parsing templates (and template elements, e.g. JS-parts of template expressions)
Methods
-
parse(rawTemplateString, view){mmir.parser.ParsingResult}
-
Parse a text as view template (e.g. *.ehtml files).
Name Type Description rawTemplateString
String the text that should be parsed view
Object optional (optional) the view to which the rawTemplateString belongs (only used for error messages) Returns:
parsing result
-
parseJS(rawTemplateString, parseEntryRuleName, view){mmir.parser.ParsingResult}
-
Parse a text as JavaScript.
Name Type Description rawTemplateString
String the text that should be parsed parseEntryRuleName
String optional (optional) specifies the JavaScript element that should be parsed for view
Object optional (optional) the view to which the rawTemplateString belongs (only used for error messages) Returns:
parsing result