Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mincss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
mincss
Commits
b54ca447
Commit
b54ca447
authored
Aug 12, 2015
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
abb3154f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
lexer.mll
lexer.mll
+1
-3
selector.ml
selector.ml
+4
-6
No files found.
lexer.mll
View file @
b54ca447
...
...
@@ -120,9 +120,7 @@ rule token = parse
let a = if a = "" then 1 else int_of_string a in
let b = match b with None -> 0 | Some n -> int_of_string n in
let apply_sign n = function Some '-' -> -n | _ -> n in
let a = apply_sign a a_sign in
let b = apply_sign b b_sign in
FORMULA (a, b)
FORMULA (apply_sign a a_sign, apply_sign b b_sign)
}
| O N L Y { ONLY }
...
...
selector.ml
View file @
b54ca447
...
...
@@ -29,10 +29,9 @@ let rec specificity =
let
precedes
(
a
,
b
,
c
,
d
)
(
e
,
f
,
g
,
h
)
=
let
rec
loop
=
function
|
[]
->
true
|
0
::
tl
->
loop
tl
|
n
::
_
when
n
>
0
->
true
|
_
->
false
|
0
::
tl
->
loop
tl
|
[]
|
n
::
_
when
n
>
0
->
true
|
_
->
false
in
loop
[
a
-
e
;
b
-
f
;
c
-
g
;
d
-
h
]
...
...
@@ -64,8 +63,7 @@ let can_match_same selector1 selector2 =
in
let
rec
intersect
l
=
function
|
[]
->
false
|
hd
::
_
when
List
.
mem
hd
l
->
true
|
_
::
tl
->
intersect
l
tl
|
hd
::
tl
->
List
.
mem
hd
l
||
intersect
l
tl
in
let
elem1
,
classes1
,
ids1
,
pseudos1
,
attrs1
=
unfold
selector1
in
let
elem2
,
classes2
,
ids2
,
pseudos2
,
attrs2
=
unfold
selector2
in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment