hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 434b0543c55064256c267256bc455f5217fee897
parent d396fa03d53033441b5bfb2fd97c81835e09f57c
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue,  6 Apr 2021 11:04:30 -0400

encoding::xml: simplify scan_element

Diffstat:
Mencoding/xml/parser.ha | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/encoding/xml/parser.ha b/encoding/xml/parser.ha @@ -63,8 +63,7 @@ export fn scan(par: *parser) (token | void | error) = { fn scan_element(par: *parser) (token | error) = { want(par, '<')?; - let name = scan_name(par)?; - return name: elementstart; + return scan_name(par)?: elementstart; }; fn scan_name(par: *parser) (str | error) = {