From b434fe4e14f6dcc8d1d7433a29351b8e8ea77d37 Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Thu, 2 May 2024 21:45:45 +0100 Subject: Add , subex syntax to make FullMerge commands easier --- subex/parse.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'subex/parse.go') diff --git a/subex/parse.go b/subex/parse.go index 9a7a75c..e91008a 100644 --- a/subex/parse.go +++ b/subex/parse.go @@ -520,6 +520,17 @@ func parseSubex(l RuneReader, minPower int, inType Type) (lhs SubexAST, outType } else { lhs = SubexASTCopyAnyValue{} } + case ',': + switch inType { + case ValueType: + outType = inType + lhs = SubexASTCopyAnySimpleValue{} + case RuneType: + outType = inType + lhs = SubexASTCopyRune{','} + default: + panic("Invalid inType") + } case '?': outType = inType lhs = SubexASTCopyBool{} -- cgit v1.2.3