File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " tree-sitter-org"
3
3
description = " org grammar for the tree-sitter parsing library"
4
- version = " 1.3.0 "
4
+ version = " 1.3.1 "
5
5
keywords = [" incremental" , " parsing" , " org" ]
6
6
categories = [" parsing" , " text-editors" ]
7
7
repository = " https://github.com/milisims/tree-sitter-org"
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " tree-sitter-org" ,
3
- "version" : " 1.3.0 " ,
3
+ "version" : " 1.3.1 " ,
4
4
"description" : " Org grammar for tree-sitter" ,
5
5
"main" : " bindings/node" ,
6
6
"keywords" : [
Original file line number Diff line number Diff line change @@ -105,6 +105,16 @@ struct Scanner {
105
105
return true ;
106
106
}
107
107
108
+ bool in_error_recovery (const bool *valid_symbols) {
109
+ return (valid_symbols[LISTSTART] &&
110
+ valid_symbols[LISTEND] &&
111
+ valid_symbols[LISTITEMEND] &&
112
+ valid_symbols[BULLET] &&
113
+ valid_symbols[HLSTARS] &&
114
+ valid_symbols[SECTIONEND] &&
115
+ valid_symbols[ENDOFFILE]);
116
+ }
117
+
108
118
Bullet getbullet (TSLexer *lexer) {
109
119
if (lexer->lookahead == ' -' ) {
110
120
advance (lexer);
@@ -150,6 +160,10 @@ struct Scanner {
150
160
151
161
bool scan (TSLexer *lexer, const bool *valid_symbols) {
152
162
163
+ if (in_error_recovery (valid_symbols))
164
+ return false ;
165
+
166
+
153
167
// - Section ends
154
168
int16_t indent_length = 0 ;
155
169
lexer->mark_end (lexer);
You can’t perform that action at this time.
0 commit comments