Blame view

js/lib/JSBuilder/src/Parser/Statement/Deprecated.js 517 Bytes
16035364   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Loader.require('Parser.Statement.If');

Parser.Statement.Deprecated = Ext.extend(Parser.Statement.If, {
    constructor: function() {
        Parser.Statement.Deprecated.superclass.constructor.apply(this, arguments);

        if (this.getProperty('since') === null) {
            throw new Error("[Parser.Statement.Deprecated] 'since' property is required for deprecated statement");
        }

        this.setProperty('minVersion', '<=' + this.getProperty('since'));
        this.removeProperty('since');
    }
});