Skip to content

v2.7.0

Latest

Choose a tag to compare

@Jeckerson Jeckerson released this 19 Aug 16:09

Added

  • Class constant initializers and class/trait property defaults accept a full expression instead of a single literal, so const INT8_MIN = -0x7f - 1;, const MASK = 0xff << 8 | 0x0f; and public size = 1024 * 8 { get }; now parse. Both positions reuse the ordinary expression non-terminal, so the default node is a regular expression node (sub, bitwise_or, ternary, ...) and every form that already parsed keeps its exact node shape. The grammar deliberately accepts more than a constant expression; the compiler folds the node and names the sub-expression it cannot resolve (zephir-lang/zephir#2061).