Skip to content

Commit 441ecf0

Browse files
committed
fix repeated term warning
1 parent 920b644 commit 441ecf0

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

dist.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
[ReadmeFromPod]
44
; if you want to disable generating README.md from main module's pod, then:
5-
disable = true
5+
enabled = false
66
[UploadToZef]

lib/CSS/Grammar.rakumod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ grammar CSS::Grammar:ver<0.3.10> {
3838
token uint {\d+}
3939
token op($chr) {$chr}
4040

41+
# stringchar-regular: printable ASCII chars, except: \ ' "
4142
token stringchar-regular {<[ \x20 \! \# \$ \% \& \(..\[ \]..\~ ]>+ }
4243
proto token stringchar {*}
4344
token stringchar:sym<escape> { <escape> }
@@ -84,7 +85,7 @@ grammar CSS::Grammar:ver<0.3.10> {
8485
rule property { <.ws>? <Ident> ':' }
8586
rule end-decl { ';' | <?before '}'> | $ }
8687
87-
rule color-range { <num>$<percentage>=[\%]? }
88+
rule color-range { <num>[$<percentage>=\%]? }
8889
8990
proto rule color {*}
9091
rule color:sym<rgb> {:i 'rgb('

lib/CSS/Grammar/AST.rakumod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class CSS::Grammar::AST {
6868
}
6969

7070
if %terms{$key}:exists {
71-
$.warning("repeated term " ~ $key, $value);
71+
warn "repeated term " ~ $key ~ ':' ~ $value;
7272
return Any;
7373
}
7474

lib/CSS/Grammar/Actions.rakumod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class CSS::Grammar::Actions {
184184
method color-range($/) {
185185
my $range = $<num>.ast.value;
186186
$range *= 2.55
187-
if ~$<percentage>;
187+
if $<percentage>;
188188

189189
# clip out-of-range colors, see
190190
# http://www.w3.org/TR/CSS21/syndata.html#value-def-color

0 commit comments

Comments
 (0)