10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-11-09 07:33:43 +01:00

support for recursive subroutines in indent

This commit is contained in:
Anthony Scemama 2014-03-13 15:10:02 +01:00
parent 67e6def151
commit 051e65ebf9
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ class Grep(object):
def end_program(self,string):
return re.match(self.re_end_program,string) is not None
re_begin_subroutine = re.compile(r"^\s*subroutine\s",flags=re.I)
re_begin_subroutine = re.compile(r"^\s*(recursive)?\s*subroutine\s",flags=re.I)
def begin_subroutine(self,string):
return re.match(self.re_begin_subroutine,string) is not None

View File

@ -59,7 +59,7 @@ class Sub(object):
if '_doc' not in self.__dict__:
def f(l): return
buffer = filter(lambda l:type(l) == Doc, self.text)
self._doc = map(lambda l: l.text[1:], buffer)
self._doc = map(lambda l: l.text.lstrip()[1:], buffer)
if buffer == []:
error.warn(None,"Subroutine %s is not documented"%(self.name))
return self._doc

View File

@ -106,7 +106,7 @@ class Variable(object):
if '_doc' not in self.__dict__:
text = self.text
buffer = filter(lambda l:type(l) == Doc, text)
self._doc = map(lambda l: l.text[1:], buffer)
self._doc = map(lambda l: l.text.lstrip()[1:], buffer)
if buffer == []:
error.warn(None,"Variable %s is not documented"%(self.name))
return self._doc