]> Cypherpunks.ru repositories - gostls13.git/commit
regexp/syntax: fix comment on p.literal and simplify
authorRuss Cox <rsc@golang.org>
Sat, 7 Mar 2020 14:35:12 +0000 (09:35 -0500)
committerEmmanuel Odeke <emm.odeke@gmail.com>
Fri, 17 Apr 2020 22:12:02 +0000 (22:12 +0000)
commit4d9ecde30a77f4a4197b585b42cc2117607a8c40
tree1d425aee67871deb85740ab0df7245a2ad931e8a
parent670cb9c37769f07fd8c2aac6270a9f2342d2b970
regexp/syntax: fix comment on p.literal and simplify

p.literal's doc comment said it returned a value but it doesn't.
While we're here, p.newLiteral is only called from p.literal,
so simplify the code by merging the two.

Change-Id: Ia357937a99f4e7473f0f1ec837113a39eaeb83d4
Reviewed-on: https://go-review.googlesource.com/c/go/+/222659
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/regexp/syntax/parse.go