aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/parse/mod.rs
diff options
context:
space:
mode:
authornchinth <nchinth@ncsu.edu>2014-10-17 16:30:01 -0400
committerNikhil Chinthapallee <nchinth@ncsu.edu>2014-10-29 11:31:20 -0400
commit6a736c7f3c9456224aadde71ebbd62e844fd6877 (patch)
tree26105ea56f09373c717d4190cbc7bd34cf3f1945 /components/script/parse/mod.rs
parent7ba02bb11d2d9275949cb7522c5fcbc4ebcd23d1 (diff)
downloadservo-6a736c7f3c9456224aadde71ebbd62e844fd6877.tar.gz
servo-6a736c7f3c9456224aadde71ebbd62e844fd6877.zip
Adding initial version of parser trait
Added parse_chunk method declaration to parser Removed unnecessary visibilty for parse_chunk function Implemented parse_chunk function Implemented parse_chunk fn for ServoHTMLParser Moved parser trait to mod.rs and added finish fn added licence header to mod.rs and other review comments Fixed trailing space issue Fixed failed tabular space test
Diffstat (limited to 'components/script/parse/mod.rs')
-rw-r--r--components/script/parse/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/components/script/parse/mod.rs b/components/script/parse/mod.rs
new file mode 100644
index 00000000000..6111f196053
--- /dev/null
+++ b/components/script/parse/mod.rs
@@ -0,0 +1,10 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+pub mod html;
+
+pub trait Parser {
+ fn parse_chunk(&self,input: String);
+ fn finish(&self);
+}