def newnode(tagname): global fileref global fileno global nodes if nodes is None: nodes = [pos.WmlNode(fileref, fileno, "", autowml=False)] if tagname == "[lua]": nodes.append(pos.WmlNode(fileref, fileno, tagname, autowml=False)) else: nodes.append(pos.WmlNode(fileref, fileno, tagname, autowml=True))
def newnode(tagname): global fileref global fileno global nodes if nodes is None: nodes = [pos.WmlNode(fileref, fileno, "", autowml=False)] if tagname == "[lua]": nodes.append(pos.WmlNode(fileref, fileno, tagname, autowml=False)) # elif tagname == "": # self.nodes.append( WmlNode(self.fileref, self.fileno, # "[unknown]", False) ) else: nodes.append(pos.WmlNode(fileref, fileno, tagname, autowml=True))
def addWmlInfo(info): global nodes if nodes is None: nodes = [ pos.WmlNode(fileref=fileref, fileno=fileno, tagname="", autowml=False) ] if nodes[-1].wmlinfos is None: nodes[-1].wmlinfos = [] nodes[-1].wmlinfos.append(info)
def addNodeSentence(sentence, *, ismultiline, lineno, lineno_sub, override, addition): global nodes if nodes is None: nodes = [ pos.WmlNode(fileref=fileref, fileno=fileno, tagname="", autowml=False) ] nodes[-1].add_sentence(sentence, ismultiline=ismultiline, lineno=lineno, lineno_sub=lineno_sub, override=override, addition=addition)