Skip to content

Commit

Permalink
Implemented tokenizer that will pass (almost) all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaytaph committed Sep 1, 2023
1 parent 5d1abc0 commit fdbadf0
Show file tree
Hide file tree
Showing 18 changed files with 3,931 additions and 836 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
html5lib-tests
97 changes: 96 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
[package]
name = "gosub-browser"
name = "gosub-engine"
version = "0.1.0"
edition = "2021"
authors = ["Joshua Thijssen <[email protected]>"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "html5 browser engine"
license = "MIT"
repository = "https://github.com/jaytaph/gosub-browser"
readme = "README.MD"
keywords = ["html5", "parser"]

[dependencies]
phf = { version = "0.11.2", features = ["macros"] }
derive_more = "0.99"
serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
regex = "1"
lazy_static = "1.4"
11 changes: 4 additions & 7 deletions src/main.rs → src/bin/gosub-browser.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
use std::fs::File;

#[allow(dead_code)]
mod html5_parser;

use html5_parser::input_stream::Confidence;
use html5_parser::input_stream::{Encoding, InputStream};
use html5_parser::Html5Parser;
use gosub_engine::html5_parser::input_stream::Confidence;
use gosub_engine::html5_parser::input_stream::{Encoding, InputStream};
use gosub_engine::html5_parser::parser::Html5Parser;

fn main() {
let file = File::open("hello.html").expect("could not open file");
let file = File::open("../../hello.html").expect("could not open file");

// We just read the stream from a file. It will use UTF8 as the default encoding.
let mut stream = InputStream::new();
Expand Down
Loading

0 comments on commit fdbadf0

Please sign in to comment.