File tree 1 file changed +3
-2
lines changed
autoload/vital/__vital__/Text
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ function! s:obj.exec(string) dict abort
37
37
for tkn in self .tokens
38
38
let matched_text = matchstr (a: string [(idx):],' ^' . tkn.regex)
39
39
if ! empty (matched_text)
40
- let best_tkn = s: token (tkn.label ,matched_text,idx)
40
+ let best_tkn = s: _token (tkn.label ,matched_text,idx)
41
41
break
42
42
endif
43
43
endfor
@@ -59,14 +59,15 @@ function! s:lexer(patterns) abort
59
59
return obj
60
60
endfunction
61
61
62
- function ! s: token (label ,matched_text,col ) abort
62
+ function ! s: _token (label ,matched_text,col ) abort
63
63
let obj = {}
64
64
let obj[' label' ] = a: label
65
65
let obj[' matched_text' ] = a: matched_text
66
66
let obj[' col' ] = a: col
67
67
return obj
68
68
endfunction
69
69
70
+ " Deprecated
70
71
function ! s: simple_parser (expr ) abort
71
72
echoerr ' vital: Text.Lexer: simple_parser(expr) is obsolete. Use Text.Parser.parser() instead.'
72
73
let obj = { ' expr' : a: expr , ' idx' : 0 , ' tokens' : [] }
You can’t perform that action at this time.
0 commit comments