Class: ParserUtils

mmir.parser. ParserUtils

new mmir.parser.ParserUtils()

Utility functions for parsing templates (and template elements, e.g. JS-parts of template expressions)

Methods

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:
Type Description
mmir.parser.ParsingResult the 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:
Type Description
mmir.parser.ParsingResult the parsing result