Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented tokenizer that will pass (almost) all tests #1

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading