class SyntaxTree::Parser

def on_BEGIN(statements)

on_BEGIN: (Statements statements) -> BEGINBlock
:call-seq:
def on_BEGIN(statements)
  lbrace = consume_token(LBrace)
  rbrace = consume_token(RBrace)
  start_char = find_next_statement_start(lbrace.location.end_char)
  statements.bind(
    self,
    start_char,
    start_char - line_counts[lbrace.location.start_line - 1].start,
    rbrace.location.start_char,
    rbrace.location.start_column
  )
  keyword = consume_keyword(:BEGIN)
  BEGINBlock.new(
    lbrace: lbrace,
    statements: statements,
    location: keyword.location.to(rbrace.location)
  )
end