moonbit-community/treesitter/regex_syntax/ast does not have a README file
pub(open) trait Visitor {
fn start(Self) -> Unit = _
fn visit_pre(Self, Ast) -> Unit raise = _
fn visit_post(Self, Ast) -> Unit raise = _
fn visit_alternation_in(Self) -> Unit raise = _
fn visit_concat_in(Self) -> Unit raise = _
fn visit_class_set_item_pre(Self, ClassSetItem) -> Unit raise = _
fn visit_class_set_item_post(Self, ClassSetItem) -> Unit raise = _
fn visit_class_set_binary_op_pre(Self, ClassSetBinaryOp) -> Unit raise = _
fn visit_class_set_binary_op_post(Self, ClassSetBinaryOp) -> Unit raise = _
fn visit_class_set_binary_op_in(Self, ClassSetBinaryOp) -> Unit raise = _
}pub(all) enum Ast {
Empty(Span)
Flags(SetFlags)
Literal(Literal)
Dot(Span)
Assertion(Assertion)
ClassUnicode(ClassUnicode)
ClassPerl(ClassPerl)
ClassBracketed(ClassBracketed)
Repetition(Repetition)
Group(Group)
Alternation(Alternation)
Concat(Concat)
} derive(Eq, Debug)pub(all) enum ClassSetItem {
Empty(Span)
Literal(Literal)
Range(ClassSetRange)
Ascii(ClassAscii)
Unicode(ClassUnicode)
Perl(ClassPerl)
Bracketed(ClassBracketed)
Union(ClassSetUnion)
} derive(Eq, Debug)pub(all) struct ClassUnicode {
span : Span
negated : Bool
kind : ClassUnicodeKind
} derive(Eq, Debug)pub(all) enum ClassUnicodeKind {
OneLetter(Char)
Named(String)
NamedValue(op~ : ClassUnicodeOpKind, name~ : String, value~ : String)
} derive(Eq, Debug)pub(all) enum ErrorKind {
CaptureLimitExceeded
ClassEscapeInvalid
ClassRangeInvalid
ClassRangeLiteral
ClassUnclosed
DecimalEmpty
DecimalInvalid
EscapeHexEmpty
EscapeHexInvalid
EscapeHexInvalidDigit
EscapeUnexpectedEof
EscapeUnrecognized
FlagDanglingNegation
FlagDuplicate(original~ : Span)
FlagRepeatedNegation(original~ : Span)
FlagUnexpectedEof
FlagUnrecognized
GroupNameDuplicate(original~ : Span)
GroupNameEmpty
GroupNameInvalid
GroupNameUnexpectedEof
GroupUnclosed
GroupUnopened
NestLimitExceeded(UInt)
RepetitionCountInvalid
RepetitionCountDecimalEmpty
RepetitionCountUnclosed
RepetitionMissing
SpecialWordBoundaryUnclosed
SpecialWordBoundaryUnrecognized
SpecialWordOrRepetitionUnexpectedEof
UnicodeClassInvalid
UnsupportedBackreference
UnsupportedLookAround
} derive(Eq, Debug)pub(all) enum GroupKind {
CaptureIndex(UInt)
CaptureName(starts_with_p~ : Bool, name~ : CaptureName)
NonCapturing(Flags)
} derive(Eq, Debug)pub(all) enum LiteralKind {
Verbatim
Meta
Superfluous
Octal
HexFixed(HexLiteralKind)
HexBrace(HexLiteralKind)
Special(SpecialLiteralKind)
} derive(Eq, Debug)pub struct Parser {
// private fields
}pub struct ParserBuilder {
// private fields
}pub(all) struct Repetition {
span : Span
op : RepetitionOp
greedy : Bool
ast : Ast
} derive(Eq, Debug)pub(all) enum RepetitionKind {
ZeroOrOne
ZeroOrMore
OneOrMore
Range(RepetitionRange)
} derive(Eq, Debug)fn is_escapeable_character(c : Char) -> Boolfn is_meta_character(c : Char) -> Boolfn is_word_byte(c : Byte) -> Boolfn len_utf8(c : Char) -> Int