Пример #1
0
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))
Пример #2
0
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))
Пример #3
0
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)
Пример #4
0
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)