]> Cypherpunks repositories - gostls13.git/commit
text/template/parse: add a mode to skip func-check on parsing
authorAriel Mashraki <ariel@mashraki.co.il>
Sun, 14 Mar 2021 17:04:31 +0000 (19:04 +0200)
committerIan Lance Taylor <iant@golang.org>
Mon, 19 Apr 2021 16:49:40 +0000 (16:49 +0000)
commit5780ab4f605fdf0ca7f12ebc08e80d3ac170e98a
tree11cee00cc6e5fdc417df9fe49e181b62fbc33a36
parent6b8e3e2d060b009fe92b39f7022445d96e225325
text/template/parse: add a mode to skip func-check on parsing

Following the discussion on #34652 and the proposal of #36911 (gopls),
this CL adds an option to skip the function declartion check on parsing,
in order to make it possible to parse arbitrary template text files and
get their AST.

Fixed #38627

Change-Id: Id1e0360fc726b49dcdd49716ce25563ebaae6c10
Reviewed-on: https://go-review.googlesource.com/c/go/+/301493
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
src/text/template/parse/parse.go
src/text/template/parse/parse_test.go