src/vm/oba_compiler.c
static void matchExpr(Compiler* compiler, bool canAssign) {
  // Compile the expression to push the value to match onto the stack.
  expression(compiler);
  ignoreNewlines(compiler);

  if (!match(compiler, TOK_GUARD)) {
    error(compiler, "Expected guard after match expression");
    return;
  }

  equation(compiler);
  consume(compiler, TOK_SEMICOLON, "Expected ';'");
}
// TODO(kendal): Emit an error if there are constructor patterns in this match
// expression, and some of the constructors in the family aren't handled.
Emit an error if there are constructor patterns in this match
expression, and some of the constructors in the family aren't handled.
Emit an error if there are constructor patterns in this match expression and some of the constructors in the family aren ' t handled .
static void matchExpr(Compiler* compiler, bool canAssign) {
  expression(compiler);
  ignoreNewlines(compiler);
  if (!match(compiler, TOK_GUARD)) {
    error(compiler, "Expected guard after match expression");
    return;
  }
  equation(compiler);
  consume(compiler, TOK_SEMICOLON, "Expected ';'");
}
static void matchExpr ( Compiler * compiler , bool canAssign ) { expression ( compiler ) ; ignoreNewlines ( compiler ) ; if ( ! match ( compiler , TOK_GUARD ) ) { error ( compiler , " " ) ; return ; } equation ( compiler ) ; consume ( compiler , TOK_SEMICOLON , " " ) ; }
TODO(kendal): Emit an error if there are constructor patterns in this match
expression, and some of the constructors in the family aren't handled.
TODO ( kendal ) : Emit an error if there are constructor patterns in this match expression and some of the constructors in the family aren ' t handled .
// Compile the expression to push the value to match onto the stack.