moonbit-community/html/src does not have a README file
type FormattingEntrypub enum Node {
ElementNode(Element)
TextNode(String)
CommentNode(String)
ProcessingInstructionNode(target~ : String, data~ : String)
DocumentTypeNode(name~ : String, public_id~ : String, system_id~ : String)
DocumentNode(children~ : Array[Int])
DocumentFragmentNode(children~ : Array[Int])
} derive(Eq, Debug)pub(all) enum ParseErrorCode {
AbruptClosingOfEmptyComment
EofInComment
IncorrectlyClosedComment
IncorrectlyOpenedComment
NestedComment
AbruptDoctypePublicIdentifier
AbruptDoctypeSystemIdentifier
EofInDoctype
InvalidCharacterSequenceAfterDoctypeName
MissingDoctypeName
MissingDoctypePublicIdentifier
MissingDoctypeSystemIdentifier
MissingQuoteBeforeDoctypePublicIdentifier
MissingQuoteBeforeDoctypeSystemIdentifier
MissingWhitespaceAfterDoctypePublicKeyword
MissingWhitespaceAfterDoctypeSystemKeyword
MissingWhitespaceBeforeDoctypeName
MissingWhitespaceBetweenDoctypePublicAndSystemIdentifiers
UnexpectedCharacterAfterDoctypeSystemIdentifier
DuplicateAttribute
EndTagWithAttributes
EndTagWithTrailingSolidus
EofBeforeTagName
EofInTag
InvalidFirstCharacterOfTagName
MissingAttributeValue
MissingEndTagName
MissingWhitespaceBetweenAttributes
NonVoidHtmlElementStartTagWithTrailingSolidus
UnexpectedCharacterInAttributeName
UnexpectedCharacterInUnquotedAttributeValue
UnexpectedEqualsSignBeforeAttributeName
UnexpectedNullCharacter
UnexpectedQuestionMarkInsteadOfTagName
UnexpectedSolidusInTag
DisallowedProcessingInstructionTarget
EofInProcessingInstruction
InvalidFirstCharacterOfProcessingInstructionTarget
InvalidProcessingInstructionTarget
TreeConstruction
AbsenceOfDigitsInNumericCharacterReference
CharacterReferenceOutsideUnicodeRange
ControlCharacterReference
MissingSemicolonAfterCharacterReference
NoncharacterCharacterReference
NullCharacterReference
SurrogateCharacterReference
UnknownNamedCharacterReference
CdataInHtmlContent
ControlCharacterInInputStream
EofInCdata
EofInScriptHtmlCommentLikeText
NoncharacterInInputStream
SurrogateInInputStream
} derive(Eq, Debug)impl Show for ParseErrorCodeimpl Show for QuirksModeimpl Show for SourcePositionpub(all) enum Token {
DOCTYPE(name~ : String?, public_id~ : String?, system_id~ : String?, force_quirks~ : Bool)
StartTag(name~ : String, attrs~ : Array[Attribute], self_closing~ : Bool)
EndTag(name~ : String)
Character(Char)
Comment(String)
ProcessingInstruction(target~ : String, data~ : String)
EOF
} derive(Eq, Debug)pub struct Tokenizer {
input : Array[Char]
pos : Int
line : Int
column : Int
last_pos : Int
last_line : Int
last_column : Int
saw_eof : Bool
input_error_reported : Array[Bool]
state : State
return_state : State
errors : Array[ParseError]
current_tag_name : StringBuilder
current_tag_is_end : Bool
current_tag_self_closing : Bool
current_attrs : Array[Attribute]
current_attr_name : StringBuilder
current_attr_value : StringBuilder
current_attr_duplicate : Bool
current_comment : StringBuilder
current_pi_target : StringBuilder
current_pi_data : StringBuilder
current_doctype_name : StringBuilder
current_doctype_public_id : StringBuilder
current_doctype_system_id : StringBuilder
current_doctype_force_quirks : Bool
current_doctype_public_id_set : Bool
current_doctype_system_id_set : Bool
char_ref_code : Int
temp_buffer : StringBuilder
last_start_tag_name : String
pending_tokens : Array[Token]
in_foreign_content : Bool
}pub struct TreeBuilder {
tokenizer : Tokenizer
document : Document
open_elements : Array[StackEntry]
active_formatting : Array[FormattingEntry]
mode : InsertionMode
original_mode : InsertionMode
template_modes : Array[InsertionMode]
head_element : Int
form_element : Int
scripting : Bool
frameset_ok : Bool
foster_parenting : Bool
pending_table_chars : Array[Char]
skip_next_newline : Bool
errors : Array[ParseError]
}let NO_NODE : Intfn is_formatting_element(name : String) -> BoolInstall
Download zipWHATWG HTML5 spec-compliant parser for MoonBit
Dependencies