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

Rewrite the parser to be fully incremental #68

Closed
wants to merge 74 commits into from

Add some test cases for tinycss2 code coverage.

9a5f5a0
Select commit
101c330
Add a regression test for a tinycss2 bug.
SimonSapin Jan 3, 2014
95ad783
Add more regression tests for tinycss2 bugs.
SimonSapin Apr 21, 2014
691160f
Identifiers may now begin with "--".
ezequiel Jul 21, 2014
19d6b4c
The semicolon token should not be respected.
ezequiel Jul 21, 2014
729aaf3
Merge pull request #3 from ezequiel/ident
SimonSapin Aug 16, 2014
434d99a
Merge pull request #4 from ezequiel/semicolon
SimonSapin Aug 16, 2014
9a5f5a0
Add some test cases for tinycss2 code coverage.
SimonSapin Aug 16, 2014
5afe94a
`!` not followed by `important` is just another declaration value.
SimonSapin Aug 16, 2014
b89d403
Quoted URLs are now tokenized as functions.
rgrove Oct 6, 2014
cdda691
Make bad URL function tests more useful.
rgrove Oct 8, 2014
86d34b7
Merge pull request #5 from rgrove/url-functions
SimonSapin Oct 8, 2014
482840d
Remove NUL handling from preprocessing.
SimonSapin Dec 23, 2014
b6c0b0c
Disable line counting temporarily.
SimonSapin Dec 23, 2014
8aafbd2
Remove newline handling from preprocessing.
SimonSapin Dec 23, 2014
98c1e58
Remove the tokenizer’s pre-processing step.
SimonSapin Dec 23, 2014
14b5a4c
Make the tokenizer borrow rather than own its input.
SimonSapin Dec 23, 2014
5960123
Merge css-parsing-tests commit '86d34b729978df74bc91a66ce0e2951187a10…
SimonSapin Dec 28, 2014
d211431
Allow idents to start with --
SimonSapin Dec 28, 2014
41fa928
Rewrite ALL THE THINGS!
SimonSapin Dec 23, 2014
3afdf40
Use the `matches` crate rather than re-defining multiple copies of it.
SimonSapin Dec 29, 2014
9965b0d
Use `while let` instead of `loop` + `match` + `break`.
SimonSapin Dec 29, 2014
307180f
Remove the Tokenizer::length field.
SimonSapin Dec 29, 2014
90168be
Encapsulate input/position access in tokenizer.
SimonSapin Dec 29, 2014
520f8fe
Avoid "rewinding" the input in the tokenizer.
SimonSapin Dec 29, 2014
88eb753
Merge branch 'rustup_20141221' into incremental
SimonSapin Jan 5, 2015
a8b8f97
Fix Rust-upgrade warnings.
SimonSapin Jan 5, 2015
57128c1
Add and use a match_ignore_ascii_case! macro.
SimonSapin Jan 5, 2015
6a69f0f
Fix incorrect doc-comment.
SimonSapin Jan 5, 2015
0b9da96
Don’t preserve the full string representation of numbers.
SimonSapin Jan 5, 2015
b67e3c5
Change all `String` fields in `Token` to `CowString`.
SimonSapin Jan 5, 2015
c9632be
Use `Cow::Borrowed` for the value of ident-like tokens without escape…
SimonSapin Jan 6, 2015
f307a40
Use `Cow::Borrowed` for the value of string-like tokens without escap…
SimonSapin Jan 6, 2015
f52dad3
Use `Cow::Borrowed` for the value of unquoted URL tokens without esca…
SimonSapin Jan 6, 2015
0172d58
Fix escaped NULs
SimonSapin Jan 6, 2015
d2531ef
Make Parser.tokenizer not be an Option. Have a boolean field instead.
SimonSapin Jan 6, 2015
e59f5cf
Make Tokenizer::slice_from public.
SimonSapin Jan 6, 2015
66dfce8
Add SourceLocation (line numbers) back, but on demand.
SimonSapin Jan 6, 2015
fe4c3b9
Make {Rule,Declaration}RuleListParser fields public.
SimonSapin Jan 6, 2015
516c1c6
Rename TokenizerPosition to SourcePosition
SimonSapin Jan 6, 2015
8d8ea17
Add Parser::expect_url_or_string
SimonSapin Jan 6, 2015
702ec92
Allow parse_until_before to be reentrant
SimonSapin Jan 6, 2015
40b851e
Add Parser::parse_comma_separated
SimonSapin Jan 6, 2015
2a69030
Add Parser::expect_ident_or_string
SimonSapin Jan 7, 2015
bd837b1
Add DeclarationListParser::run and RuleListParser::run.
SimonSapin Jan 7, 2015
f5b224a
Add Parser::expect_{ident_matching,delim,function}
SimonSapin Jan 8, 2015
c971b14
Add Parser::unexpected_ident
SimonSapin Jan 8, 2015
29a6941
Rename AtRulePrelude to AtRuleType
SimonSapin Jan 8, 2015
1796776
Refactor parser.rs to simplify it and propably fix multiple bugs.
SimonSapin Jan 13, 2015
cdcb0b4
Make Parser::new take a &str instead of &mut Tokenizer, and remove Pa…
SimonSapin Jan 12, 2015
d53c0d3
Implement Clone for Parser.
SimonSapin Jan 12, 2015
df19cde
Make source location methods take &self instead of &mut self. (Use a …
SimonSapin Jan 13, 2015
22317ac
Reformat some code for readability.
SimonSapin Jan 14, 2015
563d178
Fix some parsing bugs.
SimonSapin Jan 15, 2015
03d06b3
Remove ast.rs file left over from 41fa928b7df1acc05b16af5f4ec3edb2292…
SimonSapin Jan 15, 2015
0480fa9
Change Token::Percentage to have values in 0..1 instead of 0..100
SimonSapin Jan 15, 2015
4ebb01a
Internal refactor: have "nested" parsers not consume their end token.
SimonSapin Jan 16, 2015
d124386
Internal refactor: remove the Parser::exhausted boolean flag.
SimonSapin Jan 16, 2015
12b2939
Internal refactor: remove consume_until_end_of_block’s return value.
SimonSapin Jan 16, 2015
8da3a37
Internal refactor: merge parse_until_before_end_of into parse_until_b…
SimonSapin Jan 16, 2015
1389597
Internal refactor: rename Tokenizer::current_char to next_char.
SimonSapin Jan 16, 2015
2111d66
Remove peek/push_back/unexpect, add Parser::reset instead.
SimonSapin Jan 16, 2015
d40971b
Internal refactor: Rename Parser::parse_until_before to stop_before.
SimonSapin Jan 16, 2015
b8bfa5f
Enable Parser::try’s return value to borrow the input (e.g. be a token)
SimonSapin Jan 19, 2015
281f911
Add Parser::expect_{square_bracket,parethesis}_block
SimonSapin Jan 19, 2015
1c6672a
Internal refactor: make some code easier to understand.
SimonSapin Jan 19, 2015
45741e0
Fix bug with delimiter parser going over their limit because of CSS c…
SimonSapin Jan 19, 2015
0c8be75
Simplify parse_important.
SimonSapin Jan 19, 2015
ca3bfb9
Emit a token for CSS comments.
SimonSapin Jan 20, 2015
83b7cc8
Keep in tokens the origin content of whitespace and comments.
SimonSapin Jan 20, 2015
55e0824
Serialize negative zero with a minus sign.
SimonSapin Jan 21, 2015
d911962
Serialize <unicode-range> with question marks when possible.
SimonSapin Jan 21, 2015
f94502f
Remove some unnecessary conversions.
SimonSapin Jan 21, 2015
8636623
Remove serialization special cases now that comments are tokenized.
SimonSapin Jan 21, 2015
8d1b3e2
Add Parser::expect_function_matching
SimonSapin Jan 21, 2015
Closed

Rewrite the parser to be fully incremental #68

Add some test cases for tinycss2 code coverage.
9a5f5a0
Select commit
101c330
Add a regression test for a tinycss2 bug.
SimonSapin Jan 3, 2014
95ad783
Add more regression tests for tinycss2 bugs.
SimonSapin Apr 21, 2014
691160f
Identifiers may now begin with "--".
ezequiel Jul 21, 2014
19d6b4c
The semicolon token should not be respected.
ezequiel Jul 21, 2014
729aaf3
Merge pull request #3 from ezequiel/ident
SimonSapin Aug 16, 2014
434d99a
Merge pull request #4 from ezequiel/semicolon
SimonSapin Aug 16, 2014
9a5f5a0
Add some test cases for tinycss2 code coverage.
SimonSapin Aug 16, 2014
5afe94a
`!` not followed by `important` is just another declaration value.
SimonSapin Aug 16, 2014
b89d403
Quoted URLs are now tokenized as functions.
rgrove Oct 6, 2014
cdda691
Make bad URL function tests more useful.
rgrove Oct 8, 2014
86d34b7
Merge pull request #5 from rgrove/url-functions
SimonSapin Oct 8, 2014
482840d
Remove NUL handling from preprocessing.
SimonSapin Dec 23, 2014
b6c0b0c
Disable line counting temporarily.
SimonSapin Dec 23, 2014
8aafbd2
Remove newline handling from preprocessing.
SimonSapin Dec 23, 2014
98c1e58
Remove the tokenizer’s pre-processing step.
SimonSapin Dec 23, 2014
14b5a4c
Make the tokenizer borrow rather than own its input.
SimonSapin Dec 23, 2014
5960123
Merge css-parsing-tests commit '86d34b729978df74bc91a66ce0e2951187a10…
SimonSapin Dec 28, 2014
d211431
Allow idents to start with --
SimonSapin Dec 28, 2014
41fa928
Rewrite ALL THE THINGS!
SimonSapin Dec 23, 2014
3afdf40
Use the `matches` crate rather than re-defining multiple copies of it.
SimonSapin Dec 29, 2014
9965b0d
Use `while let` instead of `loop` + `match` + `break`.
SimonSapin Dec 29, 2014
307180f
Remove the Tokenizer::length field.
SimonSapin Dec 29, 2014
90168be
Encapsulate input/position access in tokenizer.
SimonSapin Dec 29, 2014
520f8fe
Avoid "rewinding" the input in the tokenizer.
SimonSapin Dec 29, 2014
88eb753
Merge branch 'rustup_20141221' into incremental
SimonSapin Jan 5, 2015
a8b8f97
Fix Rust-upgrade warnings.
SimonSapin Jan 5, 2015
57128c1
Add and use a match_ignore_ascii_case! macro.
SimonSapin Jan 5, 2015
6a69f0f
Fix incorrect doc-comment.
SimonSapin Jan 5, 2015
0b9da96
Don’t preserve the full string representation of numbers.
SimonSapin Jan 5, 2015
b67e3c5
Change all `String` fields in `Token` to `CowString`.
SimonSapin Jan 5, 2015
c9632be
Use `Cow::Borrowed` for the value of ident-like tokens without escape…
SimonSapin Jan 6, 2015
f307a40
Use `Cow::Borrowed` for the value of string-like tokens without escap…
SimonSapin Jan 6, 2015
f52dad3
Use `Cow::Borrowed` for the value of unquoted URL tokens without esca…
SimonSapin Jan 6, 2015
0172d58
Fix escaped NULs
SimonSapin Jan 6, 2015
d2531ef
Make Parser.tokenizer not be an Option. Have a boolean field instead.
SimonSapin Jan 6, 2015
e59f5cf
Make Tokenizer::slice_from public.
SimonSapin Jan 6, 2015
66dfce8
Add SourceLocation (line numbers) back, but on demand.
SimonSapin Jan 6, 2015
fe4c3b9
Make {Rule,Declaration}RuleListParser fields public.
SimonSapin Jan 6, 2015
516c1c6
Rename TokenizerPosition to SourcePosition
SimonSapin Jan 6, 2015
8d8ea17
Add Parser::expect_url_or_string
SimonSapin Jan 6, 2015
702ec92
Allow parse_until_before to be reentrant
SimonSapin Jan 6, 2015
40b851e
Add Parser::parse_comma_separated
SimonSapin Jan 6, 2015
2a69030
Add Parser::expect_ident_or_string
SimonSapin Jan 7, 2015
bd837b1
Add DeclarationListParser::run and RuleListParser::run.
SimonSapin Jan 7, 2015
f5b224a
Add Parser::expect_{ident_matching,delim,function}
SimonSapin Jan 8, 2015
c971b14
Add Parser::unexpected_ident
SimonSapin Jan 8, 2015
29a6941
Rename AtRulePrelude to AtRuleType
SimonSapin Jan 8, 2015
1796776
Refactor parser.rs to simplify it and propably fix multiple bugs.
SimonSapin Jan 13, 2015
cdcb0b4
Make Parser::new take a &str instead of &mut Tokenizer, and remove Pa…
SimonSapin Jan 12, 2015
d53c0d3
Implement Clone for Parser.
SimonSapin Jan 12, 2015
df19cde
Make source location methods take &self instead of &mut self. (Use a …
SimonSapin Jan 13, 2015
22317ac
Reformat some code for readability.
SimonSapin Jan 14, 2015
563d178
Fix some parsing bugs.
SimonSapin Jan 15, 2015
03d06b3
Remove ast.rs file left over from 41fa928b7df1acc05b16af5f4ec3edb2292…
SimonSapin Jan 15, 2015
0480fa9
Change Token::Percentage to have values in 0..1 instead of 0..100
SimonSapin Jan 15, 2015
4ebb01a
Internal refactor: have "nested" parsers not consume their end token.
SimonSapin Jan 16, 2015
d124386
Internal refactor: remove the Parser::exhausted boolean flag.
SimonSapin Jan 16, 2015
12b2939
Internal refactor: remove consume_until_end_of_block’s return value.
SimonSapin Jan 16, 2015
8da3a37
Internal refactor: merge parse_until_before_end_of into parse_until_b…
SimonSapin Jan 16, 2015
1389597
Internal refactor: rename Tokenizer::current_char to next_char.
SimonSapin Jan 16, 2015
2111d66
Remove peek/push_back/unexpect, add Parser::reset instead.
SimonSapin Jan 16, 2015
d40971b
Internal refactor: Rename Parser::parse_until_before to stop_before.
SimonSapin Jan 16, 2015
b8bfa5f
Enable Parser::try’s return value to borrow the input (e.g. be a token)
SimonSapin Jan 19, 2015
281f911
Add Parser::expect_{square_bracket,parethesis}_block
SimonSapin Jan 19, 2015
1c6672a
Internal refactor: make some code easier to understand.
SimonSapin Jan 19, 2015
45741e0
Fix bug with delimiter parser going over their limit because of CSS c…
SimonSapin Jan 19, 2015
0c8be75
Simplify parse_important.
SimonSapin Jan 19, 2015
ca3bfb9
Emit a token for CSS comments.
SimonSapin Jan 20, 2015
83b7cc8
Keep in tokens the origin content of whitespace and comments.
SimonSapin Jan 20, 2015
55e0824
Serialize negative zero with a minus sign.
SimonSapin Jan 21, 2015
d911962
Serialize <unicode-range> with question marks when possible.
SimonSapin Jan 21, 2015
f94502f
Remove some unnecessary conversions.
SimonSapin Jan 21, 2015
8636623
Remove serialization special cases now that comments are tokenized.
SimonSapin Jan 21, 2015
8d1b3e2
Add Parser::expect_function_matching
SimonSapin Jan 21, 2015

Workflow runs completed with no jobs

You can’t perform that action at this time.