]>
git.proxmox.com Git - rustc.git/blob - src/vendor/html5ever/src/tree_builder/types.rs
1 // Copyright 2014-2017 The html5ever Project Developers. See the
2 // COPYRIGHT file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
10 //! Types used within the tree builder code. Not exported to users.
13 use tokenizer
::states
::RawKind
;
15 use tendril
::StrTendril
;
17 pub use self::InsertionMode
::*;
18 pub use self::SplitStatus
::*;
19 pub use self::Token
::*;
20 pub use self::ProcessResult
::*;
21 pub use self::FormatEntry
::*;
22 pub use self::InsertionPoint
::*;
24 #[derive(PartialEq, Eq, Copy, Clone, Debug)]
25 pub enum InsertionMode
{
51 #[derive(PartialEq, Eq, Copy, Clone, Debug)]
52 pub enum SplitStatus
{
58 /// A subset/refinement of `tokenizer::Token`. Everything else is handled
59 /// specially at the beginning of `process_token`.
60 #[derive(PartialEq, Eq, Clone, Debug)]
63 CommentToken(StrTendril
),
64 CharacterTokens(SplitStatus
, StrTendril
),
69 pub enum ProcessResult
<Handle
> {
72 SplitWhitespace(StrTendril
),
73 Reprocess(InsertionMode
, Token
),
74 ReprocessForeign(Token
),
80 pub enum FormatEntry
<Handle
> {
85 pub enum InsertionPoint
<Handle
> {
86 /// Insert as last child in this parent.
88 /// Insert before this following sibling.