From 9bffe238bd97d1dc606c84f2dfc4c73c99b36eea Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Thu, 20 Apr 2023 15:31:05 +0100 Subject: Properly exports all SubexASTs --- subex/parse.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'subex/parse.go') diff --git a/subex/parse.go b/subex/parse.go index 4b1aa6e..5675ae0 100644 --- a/subex/parse.go +++ b/subex/parse.go @@ -305,7 +305,7 @@ func parseSubex(l RuneReader, minPower int) SubexAST { } lhs = SubexASTOutput {replacement} default: - lhs = SubexASTCopyAtom{atom: walk.StringAtom(r)} + lhs = SubexASTCopyAtom{Atom: walk.StringAtom(r)} } loop: for { if minPower <= 0 { @@ -319,8 +319,8 @@ func parseSubex(l RuneReader, minPower int) SubexAST { switch { case r == '{' && minPower <= 8: lhs = SubexASTRepeat { - content: lhs, - acceptable: parseRepeatRange(l), + Content: lhs, + Acceptable: parseRepeatRange(l), } case r == '+' && minPower <= 8: lhs = SubexASTSum {lhs} @@ -338,8 +338,8 @@ func parseSubex(l RuneReader, minPower int) SubexAST { panic("Missing slot character") } lhs = SubexASTStore{ - match: lhs, - slot: slot, + Match: lhs, + Slot: slot, } case r == '|' && minPower <= 4: rhs := parseSubex(l, 5) @@ -353,8 +353,8 @@ func parseSubex(l RuneReader, minPower int) SubexAST { panic("Missing subex after ;") } lhs = SubexASTJoin{ - content: lhs, - delimiter: rhs, + Content: lhs, + Delimiter: rhs, } default: l.Rewind() -- cgit v1.2.3