parser icon indicating copy to clipboard operation
parser copied to clipboard

Grammar cannot read git trailers

Open epage opened this issue 4 years ago • 0 comments

Compare

<footer>          ::= <token>, <separator>, <whitespace>*, <value>
/* "!" should be added to the AST as a <breaking-change> node with the value "!" */
<token>           ::= <breaking-change>
                   |  <type>, "(" <scope> ")", ["!"]
                   |  <type>, ["!"]
<separator>       ::= ":" | " #"
<value>           ::= <text>, <continuation>+
                   |  <text>
<continuation>    ::= <newline>, <whitespace>+, <text>

with https://git-scm.com/docs/git-interpret-trailers

  • "When reading trailers, there can be whitespaces after the token, the separator and the value"
  • "There can also be whitespaces inside the token and the value"
    • This one seems like it makes parsing trailers a lot harder and doesn't seem common

epage avatar Oct 19 '21 14:10 epage