@@ -4274,24 +4274,24 @@ let s:RegexpParser.RE_NOMAGIC = 2
4274
4274
let s: RegexpParser .RE_MAGIC = 3
4275
4275
let s: RegexpParser .RE_VERY_MAGIC = 4
4276
4276
4277
- function s: RegexpParser .new (... )
4277
+ function ! s: RegexpParser .new (... )
4278
4278
let obj = copy (self )
4279
4279
call call (obj.__init__, a: 000 , obj)
4280
4280
return obj
4281
4281
endfunction
4282
4282
4283
- function s: RegexpParser .__init__ (reader, cmd, delim)
4283
+ function ! s: RegexpParser .__init__ (reader, cmd, delim)
4284
4284
let self .reader = a: reader
4285
4285
let self .cmd = a: cmd
4286
4286
let self .delim = a: delim
4287
4287
let self .reg_magic = self .RE_MAGIC
4288
4288
endfunction
4289
4289
4290
- function s: RegexpParser .isend (c )
4290
+ function ! s: RegexpParser .isend (c )
4291
4291
return a: c == # ' <EOF>' || a: c == # ' <EOL>' || a: c == # self .delim
4292
4292
endfunction
4293
4293
4294
- function s: RegexpParser .parse_regexp ()
4294
+ function ! s: RegexpParser .parse_regexp ()
4295
4295
let prevtoken = ' '
4296
4296
let ntoken = ' '
4297
4297
let ret = []
@@ -4345,7 +4345,7 @@ function s:RegexpParser.parse_regexp()
4345
4345
endfunction
4346
4346
4347
4347
" @return [actual_token, normalized_token]
4348
- function s: RegexpParser .get_token ()
4348
+ function ! s: RegexpParser .get_token ()
4349
4349
if self .reg_magic == self .RE_VERY_MAGIC
4350
4350
return self .get_token_very_magic ()
4351
4351
elseif self .reg_magic == self .RE_MAGIC
@@ -4357,7 +4357,7 @@ function s:RegexpParser.get_token()
4357
4357
endif
4358
4358
endfunction
4359
4359
4360
- function s: RegexpParser .get_token_very_magic ()
4360
+ function ! s: RegexpParser .get_token_very_magic ()
4361
4361
if self .isend (self .reader.peek ())
4362
4362
return [' <END>' , ' <END>' ]
4363
4363
endif
@@ -4404,7 +4404,7 @@ function s:RegexpParser.get_token_very_magic()
4404
4404
return [c , c ]
4405
4405
endfunction
4406
4406
4407
- function s: RegexpParser .get_token_magic ()
4407
+ function ! s: RegexpParser .get_token_magic ()
4408
4408
if self .isend (self .reader.peek ())
4409
4409
return [' <END>' , ' <END>' ]
4410
4410
endif
@@ -4455,7 +4455,7 @@ function s:RegexpParser.get_token_magic()
4455
4455
return [c , c ]
4456
4456
endfunction
4457
4457
4458
- function s: RegexpParser .get_token_nomagic ()
4458
+ function ! s: RegexpParser .get_token_nomagic ()
4459
4459
if self .isend (self .reader.peek ())
4460
4460
return [' <END>' , ' <END>' ]
4461
4461
endif
@@ -4506,7 +4506,7 @@ function s:RegexpParser.get_token_nomagic()
4506
4506
return [c , c ]
4507
4507
endfunction
4508
4508
4509
- function s: RegexpParser .get_token_very_nomagic ()
4509
+ function ! s: RegexpParser .get_token_very_nomagic ()
4510
4510
if self .isend (self .reader.peek ())
4511
4511
return [' <END>' , ' <END>' ]
4512
4512
endif
@@ -4555,7 +4555,7 @@ function s:RegexpParser.get_token_very_nomagic()
4555
4555
return [c , c ]
4556
4556
endfunction
4557
4557
4558
- function s: RegexpParser .get_token_backslash_common ()
4558
+ function ! s: RegexpParser .get_token_backslash_common ()
4559
4559
let cclass = ' iIkKfFpPsSdDxXoOwWhHaAlLuU'
4560
4560
let c = self .reader.get ()
4561
4561
if c == # ' \'
@@ -4631,7 +4631,7 @@ function s:RegexpParser.get_token_backslash_common()
4631
4631
endfunction
4632
4632
4633
4633
" \{}
4634
- function s: RegexpParser .get_token_brace (pre )
4634
+ function ! s: RegexpParser .get_token_brace (pre )
4635
4635
let r = ' '
4636
4636
let minus = ' '
4637
4637
let comma = ' '
@@ -4664,7 +4664,7 @@ function s:RegexpParser.get_token_brace(pre)
4664
4664
endfunction
4665
4665
4666
4666
" \[]
4667
- function s: RegexpParser .get_token_sq (pre )
4667
+ function ! s: RegexpParser .get_token_sq (pre )
4668
4668
let start = self .reader.tell ()
4669
4669
let r = ' '
4670
4670
" Complement of range
@@ -4725,7 +4725,7 @@ function s:RegexpParser.get_token_sq(pre)
4725
4725
endfunction
4726
4726
4727
4727
" [c]
4728
- function s: RegexpParser .get_token_sq_c ()
4728
+ function ! s: RegexpParser .get_token_sq_c ()
4729
4729
let c = self .reader.p (0 )
4730
4730
if c == # ' \'
4731
4731
call self .reader.seek_cur (1 )
@@ -4764,7 +4764,7 @@ function s:RegexpParser.get_token_sq_c()
4764
4764
endfunction
4765
4765
4766
4766
" [\d123]
4767
- function s: RegexpParser .get_token_sq_coll_char ()
4767
+ function ! s: RegexpParser .get_token_sq_coll_char ()
4768
4768
let pos = self .reader.tell ()
4769
4769
let c = self .reader.get ()
4770
4770
if c == # ' d'
@@ -4793,23 +4793,23 @@ function s:RegexpParser.get_token_sq_coll_char()
4793
4793
endfunction
4794
4794
4795
4795
" [[.a.]]
4796
- function s: RegexpParser .get_token_sq_coll_element ()
4796
+ function ! s: RegexpParser .get_token_sq_coll_element ()
4797
4797
if self .reader.p (0 ) == # ' [' && self .reader.p (1 ) == # ' .' && ! self .isend (self .reader.p (2 )) && self .reader.p (3 ) == # ' .' && self .reader.p (4 ) == # ' ]'
4798
4798
return self .reader.getn (5 )
4799
4799
endif
4800
4800
return ' '
4801
4801
endfunction
4802
4802
4803
4803
" [[=a=]]
4804
- function s: RegexpParser .get_token_sq_equi_class ()
4804
+ function ! s: RegexpParser .get_token_sq_equi_class ()
4805
4805
if self .reader.p (0 ) == # ' [' && self .reader.p (1 ) == # ' =' && ! self .isend (self .reader.p (2 )) && self .reader.p (3 ) == # ' =' && self .reader.p (4 ) == # ' ]'
4806
4806
return self .reader.getn (5 )
4807
4807
endif
4808
4808
return ' '
4809
4809
endfunction
4810
4810
4811
4811
" [[:alpha:]]
4812
- function s: RegexpParser .get_token_sq_char_class ()
4812
+ function ! s: RegexpParser .get_token_sq_char_class ()
4813
4813
let class_names = [" alnum" , " alpha" , " blank" , " cntrl" , " digit" , " graph" , " lower" , " print" , " punct" , " space" , " upper" , " xdigit" , " tab" , " return" , " backspace" , " escape" ]
4814
4814
let pos = self .reader.tell ()
4815
4815
if self .reader.p (0 ) == # ' [' && self .reader.p (1 ) == # ' :'
@@ -4829,7 +4829,7 @@ function s:RegexpParser.get_token_sq_char_class()
4829
4829
endfunction
4830
4830
4831
4831
" \@...
4832
- function s: RegexpParser .get_token_at (pre )
4832
+ function ! s: RegexpParser .get_token_at (pre )
4833
4833
let epos = self .reader.getpos ()
4834
4834
let c = self .reader.get ()
4835
4835
if c == # ' >'
@@ -4850,7 +4850,7 @@ function s:RegexpParser.get_token_at(pre)
4850
4850
endfunction
4851
4851
4852
4852
" \%...
4853
- function s: RegexpParser .get_token_percent (pre )
4853
+ function ! s: RegexpParser .get_token_percent (pre )
4854
4854
let c = self .reader.get ()
4855
4855
if c == # ' ^'
4856
4856
return [a: pre . ' ^' , ' \%^' ]
@@ -4870,7 +4870,7 @@ function s:RegexpParser.get_token_percent(pre)
4870
4870
endfunction
4871
4871
4872
4872
" \%[]
4873
- function s: RegexpParser .get_token_percent_sq (pre )
4873
+ function ! s: RegexpParser .get_token_percent_sq (pre )
4874
4874
let r = ' '
4875
4875
while 1
4876
4876
let c = self .reader.peek ()
@@ -4890,7 +4890,7 @@ function s:RegexpParser.get_token_percent_sq(pre)
4890
4890
endfunction
4891
4891
4892
4892
" \%'m \%l \%c \%v
4893
- function s: RegexpParser .get_token_mlvc (pre )
4893
+ function ! s: RegexpParser .get_token_mlvc (pre )
4894
4894
let r = ' '
4895
4895
let cmp = ' '
4896
4896
if self .reader.p (0 ) == # ' <' || self .reader.p (0 ) == # ' >'
@@ -4925,15 +4925,15 @@ function s:RegexpParser.get_token_mlvc(pre)
4925
4925
throw s: Err (' E71: Invalid character after %' , self .reader.getpos ())
4926
4926
endfunction
4927
4927
4928
- function s: RegexpParser .getdecchrs ()
4928
+ function ! s: RegexpParser .getdecchrs ()
4929
4929
return self .reader.read_digit ()
4930
4930
endfunction
4931
4931
4932
- function s: RegexpParser .getoctchrs ()
4932
+ function ! s: RegexpParser .getoctchrs ()
4933
4933
return self .reader.read_odigit ()
4934
4934
endfunction
4935
4935
4936
- function s: RegexpParser .gethexchrs (n )
4936
+ function ! s: RegexpParser .gethexchrs (n )
4937
4937
let r = ' '
4938
4938
for i in range (a: n )
4939
4939
let c = self .reader.peek ()
0 commit comments