
Python3.src.antlr4.tree.Chunk.py Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of antlr4-runtime-testsuite Show documentation
Show all versions of antlr4-runtime-testsuite Show documentation
A collection of tests for ANTLR 4 Runtime libraries.
class Chunk(object):
pass
class TagChunk(Chunk):
def __init__(self, tag:str, label:str=None):
self.tag = tag
self.label = label
def __str__(self):
if self.label is None:
return self.tag
else:
return self.label + ":" + self.tag
class TextChunk(Chunk):
def __init__(self, text:str):
self.text = text
def __str__(self):
return "'" + self.text + "'"
© 2015 - 2025 Weber Informatics LLC | Privacy Policy