Fix erroneous predicates nesting
Convert z-weather__tile.bemhtml. But the BEM fieasld solution is hacky
serialize this.mods, this.elemMods getters and setters into ctx.mod() calls.
Convert bemFields this.block and this.elem into json.block and json.elem respectively
Convert this._ into ctx so that this._.isSimple() and this._.extend()
turn into ctx.isSimple() and ctx.extend()
Convert custom fields e.g. this._bla into ctx.tParam call. Works for
getters and setters. Convert this.isFirst, this.isLast, this.generateId explicitly.
Get hold of current bemjson node via explicit call to ctx.json(). This
way is applyBase safe unlike querying json argument of the template.
Add infinite-loop detection to bh
Stx.parse invokes customized parser that does not expand applyNext,
apply, applyCtx. Classifier still invokes bemhtml-compat parser.
Custom parser: don't expand apply, applyNext, applyCtx. Custom Jail is
also applyNext aware. Serialize applyNext into (applyBase(), ctx.json())
expression which falls into inifinite loop during matching.
this.extend() into ctx.extend()
Unwrap { return expr } in a template body into expr
Do not touch template body inside bhTemplate, modify and serialize it
inside _mode rule instead. For the sake of bemhtml mod `default:'
Catch `default:' mode and splice its code at the top of bh.match callback.
Refactor grammars
Refactor several getp rules
Refactor custom fields on this
Refactor getp and set
Refactor iif
Refactor grammar