src/aria/templates/ClassGenerator.js
function (out, statement) {
            var statname = statement.name;
            if (statname.charAt(0) == '@') {
                statname = '@';
            }

            var handler = this.STATEMENTS[statname];
            if (handler == null) {
                out.logError(statement, this.UNKNOWN_STATEMENT, [statname]);
            } else if (handler.container === true && statement.content === undefined) {
                out.logError(statement, this.EXPECTED_CONTAINER, [statname]);
            } else if (handler.container === false && statement.content !== undefined) {
                out.logError(statement, this.UNEXPECTED_CONTAINER, [statname]);
            } else if (handler.inMacro !== undefined && out.isOutputReady() !== handler.inMacro) {
                if (handler.inMacro) {
                    out.logError(statement, ariaTemplatesStatements.SHOULD_BE_IN_MACRO, [statname]);
                } else {
                    out.logError(statement, this.SHOULD_BE_OUT_OF_MACRO, [statname]);
                }
            } else {
                if (handler.paramRegexp) {
                    var res = handler.paramRegexp.exec(statement.paramBlock);
                    if (res == null) {
                        out.logError(statement, this.INVALID_STATEMENT_SYNTAX, [statname, handler.paramRegexp]);
                    } else {
                        if (this._isDebug) {
                            out.trackLine(statement.lineNumber);
                        }
                        handler.process(out, statement, res);
                    }
                } else {
                    if (this._isDebug) {
                        out.trackLine(statement.lineNumber);
                    }
                    handler.process(out, statement, this);
                }
            }
        }
function (out, statement) {
            var statname = statement.name;
            if (statname.charAt(0) == '@') {
                statname = '@';
            }

            var handler = this.STATEMENTS[statname];
            if (handler == null) {
                out.logError(statement, this.UNKNOWN_STATEMENT, [statname]);
            } else if (handler.container === true && statement.content === undefined) {
                out.logError(statement, this.EXPECTED_CONTAINER, [statname]);
            } else if (handler.container === false && statement.content !== undefined) {
                out.logError(statement, this.UNEXPECTED_CONTAINER, [statname]);
            } else if (handler.inMacro !== undefined && out.isOutputReady() !== handler.inMacro) {
                if (handler.inMacro) {
                    out.logError(statement, ariaTemplatesStatements.SHOULD_BE_IN_MACRO, [statname]);
                } else {
                    out.logError(statement, this.SHOULD_BE_OUT_OF_MACRO, [statname]);
                }
            } else {
                if (handler.paramRegexp) {
                    var res = handler.paramRegexp.exec(statement.paramBlock);
                    if (res == null) {
                        out.logError(statement, this.INVALID_STATEMENT_SYNTAX, [statname, handler.paramRegexp]);
                    } else {
                        if (this._isDebug) {
                            out.trackLine(statement.lineNumber);
                        }
                        handler.process(out, statement, res);
                    }
                } else {
                    if (this._isDebug) {
                        out.trackLine(statement.lineNumber);
                    }
                    handler.process(out, statement, this);
                }
            }
        }
function ( out , statement ) { var statname = statement . name ; if ( statname . charAt ( 0 ) == '@' ) { statname = '@' ; } var handler = this . STATEMENTS [ statname ] ; if ( handler == null ) { out . logError ( statement , this . UNKNOWN_STATEMENT , [ statname ] ) ; } else if ( handler . container === true && statement . content === undefined ) { out . logError ( statement , this . EXPECTED_CONTAINER , [ statname ] ) ; } else if ( handler . container === false && statement . content !== undefined ) { out . logError ( statement , this . UNEXPECTED_CONTAINER , [ statname ] ) ; } else if ( handler . inMacro !== undefined && out . isOutputReady ( ) !== handler . inMacro ) { if ( handler . inMacro ) { out . logError ( statement , ariaTemplatesStatements . SHOULD_BE_IN_MACRO , [ statname ] ) ; } else { out . logError ( statement , this . SHOULD_BE_OUT_OF_MACRO , [ statname ] ) ; } } else { if ( handler . paramRegexp ) { var res = handler . paramRegexp . exec ( statement . paramBlock ) ; if ( res == null ) { out . logError ( statement , this . INVALID_STATEMENT_SYNTAX , [ statname , handler . paramRegexp ] ) ; } else { if ( this . _isDebug ) { out . trackLine ( statement . lineNumber ) ; } handler . process ( out , statement , res ) ; } } else { if ( this . _isDebug ) { out . trackLine ( statement . lineNumber ) ; } handler . process ( out , statement , this ) ; } } }
This method is called for each statement to produce an output in the class definition. It propagates the call
to the correct process function in this.STATEMENTS, or logs errors, if the statement is unknown, or misused.
@private
@param {aria.templates.ClassWriter} out
@param {aria.templates.TreeBeans:Statement} statement
This method is called for each statement to produce an output in the class definition . It propagates the call to the correct process function in this . STATEMENTS or logs errors if the statement is unknown or misused .