parser/parsing/parser.py
def parse_flag(exp, expression):
    """
    Add flag token to Expression protobuf object

    :param expression: expression string
    :param exp: Expression protobuf object
    """
    tokens = expression.split()
    for t in tokens:
        token = root.Token()
        token.type = root.TokenType.Flag
        token.token = t
        if t == "i":
            token.flag = root.FlagType.Ignore
        elif t == "g":
            token.flag = root.FlagType.Global
        elif t == "m":
            token.flag = root.FlagType.Multiline
        elif t == "u":
            token.flag = root.FlagType.Unicode
        elif t == "y":
            token.flag = root.FlagType.Sticky
        else:
            token.flag = root.FlagType.Dotall
        exp.tokens.append(token)

    Add flag token to Expression protobuf object

    :param expression: expression string
    :param exp: Expression protobuf object
    
Add flag token to Expression protobuf object
Add flag token to Expression protobuf object
def parse_flag(exp, expression):
    tokens = expression.split()
    for t in tokens:
        token = root.Token()
        token.type = root.TokenType.Flag
        token.token = t
        if t == "i":
            token.flag = root.FlagType.Ignore
        elif t == "g":
            token.flag = root.FlagType.Global
        elif t == "m":
            token.flag = root.FlagType.Multiline
        elif t == "u":
            token.flag = root.FlagType.Unicode
        elif t == "y":
            token.flag = root.FlagType.Sticky
        else:
            token.flag = root.FlagType.Dotall
        exp.tokens.append(token)
def parse_flag ( exp , expression ) : tokens = expression . split ( ) for t in tokens : token = root . Token ( ) token . type = root . TokenType . Flag token . token = t if t == "i" : token . flag = root . FlagType . Ignore elif t == "g" : token . flag = root . FlagType . Global elif t == "m" : token . flag = root . FlagType . Multiline elif t == "u" : token . flag = root . FlagType . Unicode elif t == "y" : token . flag = root . FlagType . Sticky else : token . flag = root . FlagType . Dotall exp . tokens . append ( token )
Add flag token to Expression protobuf object
Add flag token to Expression protobuf object
"""
    Add flag token to Expression protobuf object

    :param expression: expression string
    :param exp: Expression protobuf object
    """
exp
Expression protobuf object
Expression protobuf object
expression
None