> @hascase@
> position p;
> @@
> switch@p (...)
> {
> case...:...
> }
>
> @hasdefault@
> @@
> switch (...)
> {
> default:...
> }
>
> @script: python depends on hascase && !hasdefault@
> p< @@
> print "%s %s" % (p[0].file, p[0].line)
>
> there likely is a simpler solution than this though.
I f
On Sat, 09 May 2015, SF Markus Elfring wrote:
> > @hascase@
> > position p;
> > @@
> > switch@p (...)
> > {
> > case...:...
> > }
> >
> > @hasdefault@
> > @@
> > switch (...)
> > {
> > default:...
> > }
> >
> > @script: python depends on hascase && !hasdefault@
> > p< > @@
> > print "%s %s" %
> hascase has a position variable in it and only if
> that rule applied is the python script executed - and if there
> was a default then hasdefault matched and so the python script
> will not be executed when hasdefault matched
Do the source code positions matter also for your second SmPL rule?