1*2d0d9377SMasatake YAMATO# 2*2d0d9377SMasatake YAMATO# iPythonCell.ctags --- a parser for python with IPythonCell comments 3*2d0d9377SMasatake YAMATO# 4*2d0d9377SMasatake YAMATO# Copyright (c) 2021 Masatake YAMATO 5*2d0d9377SMasatake YAMATO# Copyright (c) 2021 Red Hat, Inc. 6*2d0d9377SMasatake YAMATO# 7*2d0d9377SMasatake YAMATO# This source code is released for free distribution under the terms of the 8*2d0d9377SMasatake YAMATO# GNU General Public License version 2 or (at your option) any later version. 9*2d0d9377SMasatake YAMATO# 10*2d0d9377SMasatake YAMATO# References: 11*2d0d9377SMasatake YAMATO# 12*2d0d9377SMasatake YAMATO# - https://github.com/hanschen/vim-ipython-cell 13*2d0d9377SMasatake YAMATO# 14*2d0d9377SMasatake YAMATO# `##' cell format is disabled by default because it can cause too much 15*2d0d9377SMasatake YAMATO# false-positive tagging. Use `--extras-IPythonCell=+{doubleSharps}' 16*2d0d9377SMasatake YAMATO# to enable it. 17*2d0d9377SMasatake YAMATO# 18*2d0d9377SMasatake YAMATO--langdef=IPythonCell{base=Python} 19*2d0d9377SMasatake YAMATO--kinddef-IPythonCell=c,cell,cells 20*2d0d9377SMasatake YAMATO--_extradef-IPythonCell=doubleSharps,Include cells starting from ## 21*2d0d9377SMasatake YAMATO 22*2d0d9377SMasatake YAMATO--regex-IPythonCell=/^[ \t]*(# ?%%|# <codecell>)[ \t]*(.*[^ \t])$/\2/c/{exclusive} 23*2d0d9377SMasatake YAMATO--regex-IPythonCell=/^[ \t]*##[ \t]*(.*[^ \t])$/\1/c/{_extra=doubleSharps}{exclusive} 24