Use simplified argument list parser
This commit is contained in:
parent
75a3bc265d
commit
04943d8f63
1 changed files with 2 additions and 2 deletions
|
@ -19,11 +19,11 @@ extension Scanner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if string("rgba"), string("("), let components = commaSeparated(), components.count == 4, string(")") {
|
if string("rgba"), let components = argumentList(4) {
|
||||||
return Color(components)
|
return Color(components)
|
||||||
}
|
}
|
||||||
|
|
||||||
if string("rgb"), string("("), let components = commaSeparated(), components.count == 3, string(")") {
|
if string("rgb"), let components = argumentList(3) {
|
||||||
return Color(components)
|
return Color(components)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue