我正在尝试为Flex创建语法高亮显示。我正在使用PackageDev和YAML。
所以,我想找到一个块,从%{
开始到%}
结束,然后我需要突出显示这个块内的所有内容作为C ++代码。
我想到了两个变体,它们都不起作用:
# ...
# first
- begin: '%\{'
end: '%\}'
contentName:
patterns:
- include: source.c++ # that's doesn't work
# second
- match: '%\{((?:.|\n)*)%\}' # regexpr works correctly
name: source.c++
captures:
'1':
- include: source.c++ # that's doesn't work too