From 9c6b77239536cbee1613decaef540dbfb80b1b0d Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 21 Jun 2020 20:02:35 +0200 Subject: [PATCH] doc: update match syntax --- doc/docs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/docs.md b/doc/docs.md index 3ad48dc8d2..e97a7591d7 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -1151,7 +1151,7 @@ struct CallExpr { ... } -fn (p mut Parser) expr(precedence int) Expr { +fn (mut p Parser) expr(precedence int) Expr { match p.tok { .key_if { return IfExpr{} } ... @@ -1161,7 +1161,7 @@ fn (p mut Parser) expr(precedence int) Expr { fn gen(expr Expr) { match expr { - IfExpr { gen_if(it) } + IfExpr { gen_if(expr) } // `expr` is cast to the matched type automatically ... } }