Let me start with the problem I'm trying to solve so you can tell me if I'm going about this all wrong.
I'm writing a Gerber parser.
Here's the PEG file: https://www.ucamco.com/files/downloads/file_en/457/gerber-layer-format-peg-parsing-expression-grammar_en.ebnf?0dcf4254cd886c28568dd609fda74dcb
Near the bottom you'll see a name = /[._a-zA-Z$][._a-zA-Z0-9]*/;. That's the parser I'm trying to write right now.
Essentially, I need two parsers here.
The first takes the first letter of the name, which can be .$ or an alphabetical character.
Then the second takes the rest of the name, which can be . or any alphanumerical character.
Writing those two individual parsers is easy, but I'd like their outputs to be concatenated so I only have a single span coming out of the final name parser.
How can I concatenate those spans?
(I don't think it's important here, but I will note that I'm using nom_locate so I don't have string slices coming out of the parsers)