erg_compiler 0.6.53

Centimetre: the Erg compiler
Documentation
.RegexFlag: ClassType
.A: .RegexFlag
.ASCII: .RegexFlag
.DEBUG: .RegexFlag
.I: .RegexFlag
.IGNORECASE: .RegexFlag
.L: .RegexFlag
.LOCALE: .RegexFlag
.M: .RegexFlag
.MULTILINE: .RegexFlag
.NOFLAG: .RegexFlag
.S: .RegexFlag
.DOTALL: .RegexFlag
.X: .RegexFlag
.VERBOSE: .RegexFlag

.Match: ClassType
.Match.
    expand: (self: .Match, template: Str) -> Str
    # TODO: tuple
    group: (self: .Match, x := Int or Str) -> Str
    __getitem__: (self: .Match, x := Int or Str) -> Str

.Pattern: ClassType
.Pattern.
    search: (self: .Pattern, string: Str) -> .Match or NoneType
    match: (self: .Pattern, string: Str) -> .Match or NoneType
    fullmatch: (self: .Pattern, string: Str) -> .Match or NoneType
    split: (self: .Pattern, string: Str, maxspilit := Nat) -> [Str; _]
    findall: (self: .Pattern, string: Str) -> [Str; _]
    # TODO: iterator
    finditer: (self: .Pattern, string: Str) -> [.Match; _]
    sub: (self: .Pattern, repl: Str, string: Str, count := Nat) -> Str
    subn: (self: .Pattern, repl: Str, string: Str, count := Nat) -> (Str, Nat)
    flags: Nat
    groups: Nat
    pattern: Str

.compile: (pattern: Str, flags := Nat or .RegexFlag) -> .Pattern
.search: (pattern: Str, string: Str, flags := Nat or .RegexFlag) -> .Match or NoneType
.match: (pattern: Str, string: Str, flags := Nat or .RegexFlag) -> .Match or NoneType
.fullmatch: (pattern: Str, string: Str, flags := Nat or .RegexFlag) -> .Match or NoneType
.split: (pattern: Str, string: Str, maxspilit := Nat, flags := Nat or .RegexFlag) -> [Str; _]
.findall: (pattern: Str, string: Str, flags := Nat or .RegexFlag) -> [Str; _]
# TODO: iterator
.finditer: (pattern: Str, string: Str, flags := Nat or .RegexFlag) -> [.Match; _]
.sub: (pattern: Str, repl: Str, string: Str, count := Nat, flags := Nat or .RegexFlag) -> Str
.subn: (pattern: Str, repl: Str, string: Str, count := Nat, flags := Nat or .RegexFlag) -> (Str, Nat)
.escape: (pattern: Str) -> Str
.purge!: () => ()