Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions corpus/generated_comments.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,58 +148,58 @@ Detached HEAD
(generated_comment)
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit))
(branch))
(generated_comment
(text)
(commit)))
(branch)))

================================================================================
Up to date
Expand Down
4 changes: 2 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module.exports = grammar({
),

branch: () => BRANCH_NAME,
commit: () => COMMIT,
_commit: () => COMMIT,
number: () => NUMBER,

_generated_comment_separator: ($) =>
Expand Down Expand Up @@ -351,7 +351,7 @@ module.exports = grammar({
),
$.text
),
$.commit,
alias($._commit, $.branch),
NEWLINE
),

Expand Down
1 change: 0 additions & 1 deletion queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
(title) @text.title
(text) @text
(branch) @text.reference
(commit) @text.reference
(change) @keyword
(filepath) @text.uri
(arrow) @punctuation.delimiter
Expand Down
11 changes: 8 additions & 3 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@
"type": "PATTERN",
"value": "[^\\s'”»\"“]+"
},
"commit": {
"_commit": {
"type": "PATTERN",
"value": "[0-9a-f]{7,40}"
},
Expand Down Expand Up @@ -3140,8 +3140,13 @@
"value": "text"
},
{
"type": "SYMBOL",
"name": "commit"
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "_commit"
},
"named": true,
"value": "branch"
},
{
"type": "PATTERN",
Expand Down
8 changes: 0 additions & 8 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@
"type": "change",
"named": true
},
{
"type": "commit",
"named": true
},
{
"type": "filepath",
"named": true
Expand Down Expand Up @@ -796,10 +792,6 @@
"type": "change",
"named": true
},
{
"type": "commit",
"named": true
},
{
"type": "drop",
"named": false
Expand Down
78 changes: 39 additions & 39 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ enum {
anon_sym_Enlabranca = 37,
anon_sym_4 = 38,
aux_sym__onbranch_token1 = 39,
sym_commit = 40,
sym__commit = 40,
sym_number = 41,
anon_sym_POUNDPleaseenterthecommitmessageforyourchanges_DOTLinesstarting = 42,
anon_sym_POUNDIntroduuelmissatgedecomissiperalsvostrescanvis_DOT = 43,
Expand Down Expand Up @@ -392,7 +392,7 @@ static const char * const ts_symbol_names[] = {
[anon_sym_Enlabranca] = "text",
[anon_sym_4] = "text",
[aux_sym__onbranch_token1] = "_onbranch_token1",
[sym_commit] = "commit",
[sym__commit] = "branch",
[sym_number] = "number",
[anon_sym_POUNDPleaseenterthecommitmessageforyourchanges_DOTLinesstarting] = "generated_comment",
[anon_sym_POUNDIntroduuelmissatgedecomissiperalsvostrescanvis_DOT] = "generated_comment",
Expand Down Expand Up @@ -720,7 +720,7 @@ static const TSSymbol ts_symbol_map[] = {
[anon_sym_Enlabranca] = anon_sym_Onbranch,
[anon_sym_4] = anon_sym_Onbranch,
[aux_sym__onbranch_token1] = aux_sym__onbranch_token1,
[sym_commit] = sym_commit,
[sym__commit] = sym_branch,
[sym_number] = sym_number,
[anon_sym_POUNDPleaseenterthecommitmessageforyourchanges_DOTLinesstarting] = sym_generated_comment,
[anon_sym_POUNDIntroduuelmissatgedecomissiperalsvostrescanvis_DOT] = sym_generated_comment,
Expand Down Expand Up @@ -1168,7 +1168,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
.visible = false,
.named = false,
},
[sym_commit] = {
[sym__commit] = {
.visible = true,
.named = true,
},
Expand Down Expand Up @@ -56876,170 +56876,170 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
lookahead != 8221) ADVANCE(8396);
END_STATE();
case 8397:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
END_STATE();
case 8398:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8397);
END_STATE();
case 8399:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8398);
END_STATE();
case 8400:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8399);
END_STATE();
case 8401:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8400);
END_STATE();
case 8402:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8401);
END_STATE();
case 8403:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8402);
END_STATE();
case 8404:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8403);
END_STATE();
case 8405:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8404);
END_STATE();
case 8406:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8405);
END_STATE();
case 8407:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8406);
END_STATE();
case 8408:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8407);
END_STATE();
case 8409:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8408);
END_STATE();
case 8410:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8409);
END_STATE();
case 8411:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8410);
END_STATE();
case 8412:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8411);
END_STATE();
case 8413:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8412);
END_STATE();
case 8414:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8413);
END_STATE();
case 8415:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8414);
END_STATE();
case 8416:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8415);
END_STATE();
case 8417:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8416);
END_STATE();
case 8418:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8417);
END_STATE();
case 8419:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8418);
END_STATE();
case 8420:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8419);
END_STATE();
case 8421:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8420);
END_STATE();
case 8422:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8421);
END_STATE();
case 8423:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8422);
END_STATE();
case 8424:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8423);
END_STATE();
case 8425:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8424);
END_STATE();
case 8426:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8425);
END_STATE();
case 8427:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8426);
END_STATE();
case 8428:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8427);
END_STATE();
case 8429:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8428);
END_STATE();
case 8430:
ACCEPT_TOKEN(sym_commit);
ACCEPT_TOKEN(sym__commit);
if (('0' <= lookahead && lookahead <= '9') ||
('a' <= lookahead && lookahead <= 'f')) ADVANCE(8429);
END_STATE();
Expand Down Expand Up @@ -61773,7 +61773,7 @@ static const uint16_t ts_small_parse_table[] = {
ts_builtin_sym_end,
[3541] = 1,
ACTIONS(653), 1,
sym_commit,
sym__commit,
[3545] = 1,
ACTIONS(655), 1,
sym_number,
Expand Down