module.exports = grammar({
  name: 'ruby',

  rules: {
	_statement: $ => choice($._expression),
	_expression: $ => choice($._argument),

	_argument: $ => choice($._primary),

	_primary: $ => choice($._variable),

	_variable: $ => choice($.identifier , 'nil', 'self'),

	identifier: $ => seq(rep(choice('@', '$')), /[a-zA-Z_][a-zA-Z0-9_]*/),

	_terminator: $ => choice('\n', ';'),
  }
});

@@ -48,16 +48,128 @@
 ules: %7B%0A
+%09_compound_statement: $ =%3E seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)),%0A%0A
 %09_statem

Define compound statements.