zclsyntax: heredoc to be separate start/end tokens

Just as we have OQuote and CQuote, we need the same for heredocs so that
we can parse their contents as templates that may span multiple tokens.
This commit is contained in:
Martin Atkins 2017-05-28 09:36:32 -07:00
parent 5898b36695
commit bb87c7a0f9

View File

@ -26,14 +26,16 @@ const (
// are otherwise arbitrary and just intended to be mnemonic for humans
// who might see them in debug output.
TokenOBrace TokenType = '{'
TokenCBrace TokenType = '}'
TokenOBrack TokenType = '['
TokenCBrack TokenType = ']'
TokenOParen TokenType = '('
TokenCParen TokenType = ')'
TokenOQuote TokenType = '«'
TokenCQuote TokenType = '»'
TokenOBrace TokenType = '{'
TokenCBrace TokenType = '}'
TokenOBrack TokenType = '['
TokenCBrack TokenType = ']'
TokenOParen TokenType = '('
TokenCParen TokenType = ')'
TokenOQuote TokenType = '«'
TokenCQuote TokenType = '»'
TokenOHeredoc TokenType = 'H'
TokenCHeredoc TokenType = 'h'
TokenDot TokenType = '.'
TokenStar TokenType = '*'
@ -60,7 +62,6 @@ const (
TokenTemplateSeqEnd TokenType = '∎'
TokenStringLit TokenType = 'S'
TokenHeredoc TokenType = 'H'
TokenNumberLit TokenType = 'N'
TokenIdent TokenType = 'I'