aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer/interface.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tokenizer/interface.rs')
-rw-r--r--src/tokenizer/interface.rs17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/tokenizer/interface.rs b/src/tokenizer/interface.rs
index c331a0e..dfd9a9f 100644
--- a/src/tokenizer/interface.rs
+++ b/src/tokenizer/interface.rs
@@ -7,7 +7,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use tendril::StrTendril;
use crate::tokenizer::states;
use std::borrow::Cow;
@@ -19,9 +18,9 @@ pub use self::Token::{EOFToken, NullCharacterToken, ParseError};
// FIXME: already exists in Servo DOM
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct Doctype {
- pub name: Option<StrTendril>,
- pub public_id: Option<StrTendril>,
- pub system_id: Option<StrTendril>,
+ pub name: Option<String>,
+ pub public_id: Option<String>,
+ pub system_id: Option<String>,
pub force_quirks: bool,
}
@@ -51,16 +50,16 @@ pub enum TagKind {
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Debug)]
pub struct Attribute {
/// The name of the attribute (e.g. the `class` in `<div class="test">`)
- pub name: StrTendril,
+ pub name: String,
/// The value of the attribute (e.g. the `"test"` in `<div class="test">`)
- pub value: StrTendril,
+ pub value: String,
}
/// A tag token.
#[derive(PartialEq, Eq, Clone, Debug)]
pub struct Tag {
pub kind: TagKind,
- pub name: StrTendril,
+ pub name: String,
pub self_closing: bool,
pub attrs: Vec<Attribute>,
}
@@ -86,8 +85,8 @@ impl Tag {
pub enum Token {
DoctypeToken(Doctype),
TagToken(Tag),
- CommentToken(StrTendril),
- CharacterTokens(StrTendril),
+ CommentToken(String),
+ CharacterTokens(String),
NullCharacterToken,
EOFToken,
ParseError(Cow<'static, str>),