1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update parser files of RDoc generated by the latest KPeg

This commit is contained in:
aycabta 2021-08-10 02:35:33 +09:00
parent 6b439e9c4e
commit 44635ebe9a
2 changed files with 46 additions and 48 deletions

View file

@ -174,9 +174,8 @@ class RDoc::Markdown::Literals
end
def scan(reg)
if m = reg.match(@string[@pos..-1])
width = m.end(0)
@pos += width
if m = reg.match(@string, @pos)
@pos = m.end(0)
return true
end
@ -366,14 +365,14 @@ class RDoc::Markdown::Literals
# Alphanumeric = /\p{Word}/
def _Alphanumeric
_tmp = scan(/\A(?-mix:\p{Word})/)
_tmp = scan(/\G(?-mix:\p{Word})/)
set_failed_rule :_Alphanumeric unless _tmp
return _tmp
end
# AlphanumericAscii = /[A-Za-z0-9]/
def _AlphanumericAscii
_tmp = scan(/\A(?-mix:[A-Za-z0-9])/)
_tmp = scan(/\G(?-mix:[A-Za-z0-9])/)
set_failed_rule :_AlphanumericAscii unless _tmp
return _tmp
end
@ -387,21 +386,21 @@ class RDoc::Markdown::Literals
# Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/
def _Newline
_tmp = scan(/\A(?-mix:\n|\r\n?|\p{Zl}|\p{Zp})/)
_tmp = scan(/\G(?-mix:\n|\r\n?|\p{Zl}|\p{Zp})/)
set_failed_rule :_Newline unless _tmp
return _tmp
end
# NonAlphanumeric = /\p{^Word}/
def _NonAlphanumeric
_tmp = scan(/\A(?-mix:\p{^Word})/)
_tmp = scan(/\G(?-mix:\p{^Word})/)
set_failed_rule :_NonAlphanumeric unless _tmp
return _tmp
end
# Spacechar = /\t|\p{Zs}/
def _Spacechar
_tmp = scan(/\A(?-mix:\t|\p{Zs})/)
_tmp = scan(/\G(?-mix:\t|\p{Zs})/)
set_failed_rule :_Spacechar unless _tmp
return _tmp
end