Mercurial > vim
view runtime/syntax/racc.vim @ 34067:dbe616160092 v9.1.0003
patch 9.1.0003: Cannot build against Ruby 33 dynamically
Commit: https://github.com/vim/vim/commit/443657b32becb2318ae40e30a849bbe5cc1a153c
Author: Isao Sato <svardew@gmail.com>
Date: Wed Jan 3 19:31:05 2024 +0100
patch 9.1.0003: Cannot build against Ruby 33 dynamically
Problem: Cannot build against Ruby 33 dynamically
Solution: Ruby 33 removed transient heap, so do not use
rb_ary_transient anymore, NoMethodError format changed,
so update test for expected error message
(Isao Sato)
- ruby-3.3 removed transient heap for ruby/dyn
when +ruby/dyn with ruby-3.3 do command :ruby, E448 occur.
ruby-3.3 has no transient heap anymore, so disable rb_ary_transient etc.
$ LC_ALL=C VIMRUNTIME=runtime ./src/vim -u NONE -c 'ruby puts RUBY_VERSION'
"=> Error detected while processing command line:
"=> E448: Could not load library function rb_ary_detransient
"=> E266: Sorry, this command is disabled, the Ruby library could not be
loaded.
- ruby-3.3 changed NoMethodError format:
$ rvm 3.2.2, 3.3.0-rc1 do ruby -e 'begin; nil.name; rescue => e; puts "%s : %s"%[RUBY_VERSION, e.message]; end '
=> 3.2.2 : undefined method `name' for nil:NilClass
=> 3.3.0 : undefined method `name' for nil
so loose pattern in Test_ruby_Vim_buffer_get()
closes: #13741
Signed-off-by: Isao Sato <svardew@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 03 Jan 2024 20:00:04 +0100 |
parents | 1218c5353e2b |
children |
line wrap: on
line source
" Vim default file " Language: Racc input file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2008-06-22 if exists("b:current_syntax") finish endif let s:cpo_save = &cpo set cpo&vim syn keyword raccTodo contained TODO FIXME XXX NOTE syn region raccComment start='/\*' end='\*/' \ contains=raccTodo,@Spell syn region raccComment display oneline start='#' end='$' \ contains=raccTodo,@Spell syn region raccClass transparent matchgroup=raccKeyword \ start='\<class\>' end='\<rule\>'he=e-4 \ contains=raccComment,raccPrecedence, \ raccTokenDecl,raccExpect,raccOptions,raccConvert, \ raccStart, syn region raccPrecedence transparent matchgroup=raccKeyword \ start='\<prechigh\>' end='\<preclow\>' \ contains=raccComment,raccPrecSpec syn keyword raccPrecSpec contained nonassoc left right \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn match raccPrecToken contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn region raccPrecString matchgroup=raccPrecString start=+"+ \ skip=+\\\\\|\\"+ end=+"+ \ contains=raccSpecial \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn region raccPrecString matchgroup=raccPrecString start=+'+ \ skip=+\\\\\|\\'+ end=+'+ contains=raccSpecial \ nextgroup=raccPrecToken,raccPrecString skipwhite \ skipnl syn keyword raccTokenDecl contained token \ nextgroup=raccTokenR skipwhite skipnl syn match raccTokenR contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccTokenR skipwhite skipnl syn keyword raccExpect contained expect \ nextgroup=raccNumber skipwhite skipnl syn match raccNumber contained '\<\d\+\>' syn keyword raccOptions contained options \ nextgroup=raccOptionsR skipwhite skipnl syn keyword raccOptionsR contained omit_action_call result_var \ nextgroup=raccOptionsR skipwhite skipnl syn region raccConvert transparent contained matchgroup=raccKeyword \ start='\<convert\>' end='\<end\>' \ contains=raccComment,raccConvToken skipwhite \ skipnl syn match raccConvToken contained '\<\u[A-Z0-9_]*\>' \ nextgroup=raccString skipwhite skipnl syn keyword raccStart contained start \ nextgroup=raccTargetS skipwhite skipnl syn match raccTargetS contained '\<\l[a-z0-9_]*\>' syn match raccSpecial contained '\\["'\\]' syn region raccString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=raccSpecial syn region raccString start=+'+ skip=+\\\\\|\\'+ end=+'+ \ contains=raccSpecial syn region raccRules transparent matchgroup=raccKeyword start='\<rule\>' \ end='\<end\>' contains=raccComment,raccString, \ raccNumber,raccToken,raccTarget,raccDelimiter, \ raccAction syn match raccTarget contained '\<\l[a-z0-9_]*\>' syn match raccDelimiter contained '[:|]' syn match raccToken contained '\<\u[A-Z0-9_]*\>' syn include @raccRuby syntax/ruby.vim syn region raccAction transparent matchgroup=raccDelimiter \ start='{' end='}' contains=@raccRuby syn region raccHeader transparent matchgroup=raccPreProc \ start='^---- header.*' end='^----'he=e-4 \ contains=@raccRuby syn region raccInner transparent matchgroup=raccPreProc \ start='^---- inner.*' end='^----'he=e-4 \ contains=@raccRuby syn region raccFooter transparent matchgroup=raccPreProc \ start='^---- footer.*' end='^----'he=e-4 \ contains=@raccRuby syn sync match raccSyncHeader grouphere raccHeader '^---- header' syn sync match raccSyncInner grouphere raccInner '^---- inner' syn sync match raccSyncFooter grouphere raccFooter '^---- footer' hi def link raccTodo Todo hi def link raccComment Comment hi def link raccPrecSpec Type hi def link raccPrecToken raccToken hi def link raccPrecString raccString hi def link raccTokenDecl Keyword hi def link raccToken Identifier hi def link raccTokenR raccToken hi def link raccExpect Keyword hi def link raccNumber Number hi def link raccOptions Keyword hi def link raccOptionsR Identifier hi def link raccConvToken raccToken hi def link raccStart Keyword hi def link raccTargetS Type hi def link raccSpecial special hi def link raccString String hi def link raccTarget Type hi def link raccDelimiter Delimiter hi def link raccPreProc PreProc hi def link raccKeyword Keyword let b:current_syntax = "racc" let &cpo = s:cpo_save unlet s:cpo_save