From ac418bde03797cc8d82d3b7488b22ffcc573c1fa Mon Sep 17 00:00:00 2001 From: Arpad Ryszka Date: Sun, 29 Oct 2017 02:49:54 +0200 Subject: [PATCH] boot whitespace --- boot.go | 4 ++++ bootsyntax.go | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/boot.go b/boot.go index b0328c3..af379a6 100644 --- a/boot.go +++ b/boot.go @@ -13,6 +13,10 @@ func stringToCommitType(s string) CommitType { switch s { case "alias": return Alias + case "ws": + return Whitespace + case "nows": + return NoWhitespace case "doc": return Documentation case "root": diff --git a/bootsyntax.go b/bootsyntax.go index 8d86c1f..0c3b25d 100644 --- a/bootsyntax.go +++ b/bootsyntax.go @@ -16,7 +16,7 @@ var bootSyntaxDefs = [][]string{{ "chars", "verticaltab", "alias", "\\v", }, { "choice", - "ws", + "wschar", "alias", "space", "tab", @@ -59,7 +59,7 @@ var bootSyntaxDefs = [][]string{{ }, { "choice", "comment-segment", "alias", "block-comment", "line-comment", }, { - "sequence", "wss", "alias", "ws:0:-1", + "sequence", "wss", "alias", "wschar:0:-1", }, { "sequence", "optional-nl", "alias", "nl:0:1", }, { @@ -89,7 +89,7 @@ var bootSyntaxDefs = [][]string{{ "comment-segment", "continue-comment", }, { - "choice", "wsc", "alias", "ws", "comment", + "choice", "wsc", "alias", "wschar", "comment", }, { "sequence", "wscs", "alias", "wsc:0:-1", }, { @@ -224,12 +224,16 @@ var bootSyntaxDefs = [][]string{{ "choice", }, { "chars", "alias", "none", "alias", +}, { + "chars", "ws", "none", "ws", +}, { + "chars", "nows", "none", "nows", }, { "chars", "doc", "none", "doc", }, { "chars", "root", "none", "root", }, { - "choice", "flag", "alias", "alias", "doc", "root", + "choice", "flag", "alias", "alias", "ws", "nows", "doc", "root", }, { "chars", "colon", "alias", ":", }, {