ECMA-262 defines different types of expressions. The "expression" mentioned in the first question corresponds to the best PrimaryExpression, which is described as follows: (each indented line is a possible representation)
PrimaryExpresion: this //as the 'this'-keyword Identifier //variable or function name ('alpha' in the question) Literal //string, number, mathematical expressions ArrayLiteral //[1,2,3] ObjectLiteral // {"first" : 80} ( Expression ) //An expression encapsulated in bracket
Brown code block:
Block : { StatementList_opt } - A list of statements
The most relevant expression in this case:
ExpressionStatement : [lookahead ∉ {{, function}] Expression ;
This allows only an expression without an opening brace or the keyword 'function' at the beginning. (FunctionDeclarations are separate from statements and expressions, with the exception of lambda functions, which are FunctionExpression)
In the definition of an expression, the primary expression is not directly indicated, but, along a long chain of definitions, the primary expression can be considered as an expression:
Expression: AssignmentExpression Expression, AssingmentExpression
I checked the entire definition chain to see if PrimaryExpression is actually an expression. Here is the definition chain:
Expression: AssignmentExpression: ConditionalExpression: LogicalORExpression: LogicalANDExpression: BitwiseORExpression: BitwiseXORExpression: BitwiseANDExpression: EuqalityExpression: RelationalExpression: ShiftExpressions: AdditiveExpression: MultiplicativeExpression: UnaryExpression: PostfixExpression: LeftHandSideExpression: NewExpression: MemberExpression: PrimaryExpression:
To answer the question
The curly-bracket lens attribute specified as ObjectLiteral in ECMA-262 is , by definition, valid in each expression, unless the expression in Statement has been explicitly expressed because ExpressionStatement explicitly prevents the opening curly bracket from appearing as the first character of the expression to resolve a conflict with the code a brace block (defined as Block). FunctionBody, Block, Program (global scope) and all loop constructions (IterationStatements) use instructions and therefore have restrictions to contain only blocks, not ObjectLiterals in the code section.
Finally
The specification restricts curly braces to represent either a block of code or an object notation. Curly braces are considered a code block wherever the use of the word "var" is allowed, and vice versa.