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

Support for css #950

Closed
wants to merge 129 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
f0037cd
Initialize css module
kdy1 Aug 9, 2020
19910b3
WIP
kdy1 Aug 9, 2020
2597a11
More crates
kdy1 Aug 9, 2020
76e2a53
WIP: ast
kdy1 Aug 11, 2020
ec34386
WIP: ast
kdy1 Aug 17, 2020
2d86ef7
WIP
kdy1 Aug 22, 2020
db341a5
More ast work
kdy1 Aug 22, 2020
9e2c99d
More ast nodes
kdy1 Aug 26, 2020
be3dc68
Let's not specify version while development
kdy1 Aug 26, 2020
936dd36
tag
kdy1 Aug 26, 2020
092b368
WIP: css parser
kdy1 Aug 27, 2020
bd296c2
take_ws
kdy1 Aug 27, 2020
6ad2a0b
More work for parser
kdy1 Aug 27, 2020
baad044
WIP: Selector
kdy1 Aug 27, 2020
3bbe8cb
Move take_ws
kdy1 Aug 27, 2020
36858e9
skip_ws
kdy1 Aug 27, 2020
5803d51
parse_selectors
kdy1 Aug 27, 2020
8f63e02
Add spec module
kdy1 Aug 27, 2020
5b1d117
spec -> lexer
kdy1 Aug 27, 2020
b5085b8
lexer::parse_name
kdy1 Aug 27, 2020
e332edc
ast was wrong
kdy1 Aug 27, 2020
1847fc0
ast is very complex than I thought
kdy1 Aug 27, 2020
6be06a4
Switch to logos
kdy1 Sep 7, 2020
f4edb1f
WIP: Parser
kdy1 Sep 7, 2020
a7b5027
Need a wrapper for lexer
kdy1 Sep 7, 2020
ec1d44a
More ast work
kdy1 Sep 13, 2020
8e5b8bc
MediaQuery
kdy1 Sep 13, 2020
e5132dd
AST
kdy1 Sep 13, 2020
17e5a24
More ast work
kdy1 Sep 13, 2020
66796a6
Add HashValue
kdy1 Sep 13, 2020
0897ca6
Token
kdy1 Sep 13, 2020
b360916
Document
kdy1 Sep 13, 2020
00f6e13
WIP: parser
kdy1 Sep 13, 2020
93f40b3
ast: expose all
kdy1 Sep 13, 2020
d6a9cc2
Bump swc_atoms
kdy1 Sep 13, 2020
b1c0a0e
More atoms
kdy1 Sep 13, 2020
2039452
WIP: Parser: at rules
kdy1 Sep 13, 2020
94f6149
Add TODO
kdy1 Sep 13, 2020
02db306
More methods
kdy1 Sep 13, 2020
7fc7a47
Move some codes
kdy1 Sep 13, 2020
abf35fc
More work for parser
kdy1 Sep 13, 2020
e212ed0
Move code
kdy1 Sep 13, 2020
a404776
parse_str
kdy1 Sep 13, 2020
1d66084
parse_import_rule
kdy1 Sep 13, 2020
5dbdb5a
parse_keyframes_rule
kdy1 Sep 13, 2020
974698e
Fix macro
kdy1 Sep 13, 2020
b0bf5e1
expect! and is!
kdy1 Sep 13, 2020
f8bdbb4
Fix macros
kdy1 Sep 13, 2020
de8abc4
SyntaxError
kdy1 Sep 13, 2020
339ec4f
Again, fix macros
kdy1 Sep 13, 2020
6ce2a5b
parse_opt_word
kdy1 Sep 13, 2020
da43091
parse_keyframe_selector
kdy1 Sep 13, 2020
004cfb1
DeclBlock instead of Vec<Property>
kdy1 Sep 13, 2020
f733c20
parse_decl_block
kdy1 Sep 13, 2020
65c5334
parse_keyframe_element
kdy1 Sep 13, 2020
7284d6c
Remove duplicate
kdy1 Sep 13, 2020
e6d1d29
More media query types
kdy1 Sep 13, 2020
fb1b5af
parse_media_rule
kdy1 Sep 13, 2020
7637871
Add value.rs
kdy1 Sep 13, 2020
29a3418
More atoms
kdy1 Sep 14, 2020
ff40a6b
parse_media_query
kdy1 Sep 14, 2020
afd938c
fixup! parse_media_query
kdy1 Sep 14, 2020
2fb8692
error
kdy1 Sep 14, 2020
f1ba736
fixup! error
kdy1 Sep 14, 2020
347d220
parse_one_media_query_element
kdy1 Sep 14, 2020
a39554c
parse_font_face_rule
kdy1 Sep 14, 2020
42839aa
Add unimplemented
kdy1 Sep 14, 2020
05d8029
parse_supports_rule
kdy1 Sep 14, 2020
b15df24
parse_supports_query
kdy1 Sep 14, 2020
a820851
Add selector module
kdy1 Sep 14, 2020
2f9332b
parse_selectors
kdy1 Sep 14, 2020
7c98c9d
parse_style_rule
kdy1 Sep 14, 2020
0c0c7ff
parse_property
kdy1 Sep 14, 2020
e90fde0
WIP: parse_value
kdy1 Sep 14, 2020
03049cb
fixup! WIP: parse_value
kdy1 Sep 14, 2020
0a31322
Fix
kdy1 Sep 14, 2020
8a9aa17
as_word
kdy1 Sep 14, 2020
5d5e1a3
parse_paren_value
kdy1 Sep 14, 2020
db2d4dd
unimplemented!
kdy1 Sep 14, 2020
57805f4
Fix visibility issues
kdy1 Sep 14, 2020
0ec55f9
WIP: Adding tests
kdy1 Sep 14, 2020
b2b0f5e
Fix compilation
kdy1 Sep 15, 2020
c62947c
Css test
kdy1 Sep 15, 2020
d44198d
typo
kdy1 Sep 15, 2020
6ef7cc7
More ast work
kdy1 Sep 15, 2020
78d0bff
Bit more
kdy1 Sep 15, 2020
428fff6
More tokens
kdy1 Sep 15, 2020
7c687c2
WIP: parse_selector
kdy1 Sep 15, 2020
3193ee5
More parser work
kdy1 Sep 15, 2020
93bb30a
parse_tag_selector
kdy1 Sep 15, 2020
657cd55
Selector
kdy1 Sep 15, 2020
ff67444
More work for selector parser
kdy1 Sep 15, 2020
88b9370
Fix compilation
kdy1 Sep 15, 2020
9f2b796
trace_cur!
kdy1 Sep 16, 2020
79a67d0
WIP: Selector
kdy1 Sep 16, 2020
4d57ceb
Fix expect!
kdy1 Sep 17, 2020
26119d9
parse_class_selector
kdy1 Sep 17, 2020
0f60c6b
parse_id_selector
kdy1 Sep 17, 2020
7124558
Pretty json
kdy1 Sep 17, 2020
8658f50
Fix serde of css ast nodes
kdy1 Sep 17, 2020
b8d0ebc
Test refs
kdy1 Sep 17, 2020
8dcebe0
Be consitant with ast nodes
kdy1 Sep 17, 2020
b9523a8
Let's test using grass
kdy1 Sep 19, 2020
ad50e99
Rename
kdy1 Sep 19, 2020
e4937e4
Rename macros to grass_macros
kdy1 Sep 19, 2020
390a364
Rename macros
kdy1 Sep 19, 2020
1879404
Borrowed lots of tests from grass
kdy1 Sep 19, 2020
89e2d22
Print source code
kdy1 Sep 19, 2020
e4bc0f6
Reorder
kdy1 Sep 19, 2020
6561c0c
More tokens
kdy1 Sep 19, 2020
311ce47
parse_attribute_selector
kdy1 Sep 19, 2020
8b6ef8f
parse_attribute_selector should eat ]
kdy1 Sep 19, 2020
f55aee6
Fix parse_attribute_selector_operator
kdy1 Sep 19, 2020
14abb71
Value of attribute selector is optional
kdy1 Sep 19, 2020
bd3539d
Fix parse_attribute_selector_operator
kdy1 Sep 19, 2020
7dcdc49
Rename
kdy1 Sep 19, 2020
a0c2727
Fix parse_decl_block
kdy1 Sep 19, 2020
34ff27d
Handle whitespace
kdy1 Sep 19, 2020
348db57
parse mutliple selectors
kdy1 Sep 19, 2020
11685bf
parse_universal_selector
kdy1 Sep 19, 2020
a031aa0
PseudoSelector
kdy1 Sep 19, 2020
dec0b75
parse_pseudo_selector_args
kdy1 Sep 19, 2020
3fd3125
`:` starts a simple selector
kdy1 Sep 19, 2020
751ae26
parse_pseudo_selector_args for text args
kdy1 Sep 19, 2020
f96ac25
~ and + is selector operator
kdy1 Sep 19, 2020
a6ff411
parse_selector_combinator
kdy1 Sep 19, 2020
3891ef4
parse_selector
kdy1 Sep 19, 2020
4416e33
lint
kdy1 Sep 19, 2020
3bf2d18
reset extras
kdy1 Sep 19, 2020
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
Prev Previous commit
Next Next commit
parse_tag_selector
  • Loading branch information
kdy1 committed Sep 15, 2020
commit 93bb30afe618d09b5efeb91e98d88f5233846894
8 changes: 7 additions & 1 deletion css/parser/src/parser/selector.rs
Original file line number Diff line number Diff line change
@@ -61,7 +61,13 @@ impl Parser<'_> {
}

fn parse_tag_selector(&mut self) -> PResult<TagSelector> {
unimplemented!("parse_tag_selector")
let start = self.i.cur_pos();
let text = self.parse_word()?;

Ok(TagSelector {
span: self.i.make_span(start),
text,
})
}

fn parse_attribute_selector(&mut self) -> PResult<AttributeSelector> {