Merge pull request #2461 from youkaichao/python/doc
update python runtime doc
This commit is contained in:
commit
07735085bd
|
@ -101,14 +101,11 @@ class TokenStreamRewriter(object):
|
||||||
return self.programs.setdefault(program_name, [])
|
return self.programs.setdefault(program_name, [])
|
||||||
|
|
||||||
def getDefaultText(self):
|
def getDefaultText(self):
|
||||||
return self.getText(self.DEFAULT_PROGRAM_NAME, 0, len(self.tokens.tokens))
|
return self.getText(self.DEFAULT_PROGRAM_NAME, 0, len(self.tokens.tokens) - 1)
|
||||||
|
|
||||||
def getText(self, program_name, start, stop):
|
def getText(self, program_name, start, stop):
|
||||||
"""
|
"""
|
||||||
:type interval: IntervalSet.Interval
|
:return: the text in tokens[start, stop](closed interval)
|
||||||
:param program_name:
|
|
||||||
:param interval:
|
|
||||||
:return:
|
|
||||||
"""
|
"""
|
||||||
rewrites = self.programs.get(program_name)
|
rewrites = self.programs.get(program_name)
|
||||||
|
|
||||||
|
|
|
@ -101,11 +101,11 @@ class TokenStreamRewriter(object):
|
||||||
return self.programs.setdefault(program_name, [])
|
return self.programs.setdefault(program_name, [])
|
||||||
|
|
||||||
def getDefaultText(self):
|
def getDefaultText(self):
|
||||||
return self.getText(self.DEFAULT_PROGRAM_NAME, 0, len(self.tokens.tokens))
|
return self.getText(self.DEFAULT_PROGRAM_NAME, 0, len(self.tokens.tokens) - 1)
|
||||||
|
|
||||||
def getText(self, program_name, start:int, stop:int):
|
def getText(self, program_name, start:int, stop:int):
|
||||||
"""
|
"""
|
||||||
:return:
|
:return: the text in tokens[start, stop](closed interval)
|
||||||
"""
|
"""
|
||||||
rewrites = self.programs.get(program_name)
|
rewrites = self.programs.get(program_name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue