func (p *Parser) exprBody() *ast.BlockExpr {
	lcurly := p.consume(token.LCURLY, "expected left curly bracket over expr body")
	var stmts []ast.Stmt
	var hasStmt bool
	_, checkRCurly := p.check(token.RCURLY)
	for !checkRCurly && !p.atEOF() {
		stmt := p.stmt()
		stmts = append(stmts, stmt)
		_, checkRCurly = p.check(token.RCURLY)
		hasStmt = true
	}
	if p.atEOF() {
		p.panic("expected right curly bracket after block")
	}
	rcurly := p.consume(token.RCURLY, "expected right curly bracket '}' over expr body")
	if !hasStmt {
		p.panic("empty body, expected at least 1 statement within block")
	}
	return &ast.BlockExpr{Start: lcurly, Stmts: stmts, End: rcurly}
}
// exprBody denotes an expr body
exprBody denotes an expr body
// exprBody denotes an expr body
func (p *Parser) exprBody() *ast.BlockExpr {
	lcurly := p.consume(token.LCURLY, "expected left curly bracket over expr body")
	var stmts []ast.Stmt
	var hasStmt bool
	_, checkRCurly := p.check(token.RCURLY)
	for !checkRCurly && !p.atEOF() {
		stmt := p.stmt()
		stmts = append(stmts, stmt)
		_, checkRCurly = p.check(token.RCURLY)
		hasStmt = true
	}
	if p.atEOF() {
		p.panic("expected right curly bracket after block")
	}
	rcurly := p.consume(token.RCURLY, "expected right curly bracket '}' over expr body")
	if !hasStmt {
		p.panic("empty body, expected at least 1 statement within block")
	}
	return &ast.BlockExpr{Start: lcurly, Stmts: stmts, End: rcurly}
}
func ( p * Parser ) exprBody ( ) * ast . BlockExpr { lcurly := p . consume ( token . LCURLY , " " ) var stmts [ ] ast . Stmt var hasStmt bool _ , checkRCurly := p . check ( token . RCURLY ) for ! checkRCurly && ! p . atEOF ( ) { stmt := p . stmt ( ) stmts = append ( stmts , stmt ) _ , checkRCurly = p . check ( token . RCURLY ) hasStmt = true } if p . atEOF ( ) { p . panic ( " " ) } rcurly := p . consume ( token . RCURLY , " " ) if ! hasStmt { p . panic ( " " ) } return & ast . BlockExpr { Start : lcurly , Stmts : stmts , End : rcurly } }
exprBody denotes an expr body
exprBody denotes an expr body