Skip to content

Commit ebdcab3

Browse files
committed
More CSS::Module forward-compatibility
1 parent f29226d commit ebdcab3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/CSS/Grammar/AST.rakumod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ method node($/ --> Hash) {
5656
if $key.starts-with('expr-') {
5757
$key.substr-rw(4,1) = ':';
5858
}
59-
elsif $key.starts-with('val-') {
60-
$key = 'expr:' ~ $key.substr(4);
59+
elsif $key.starts-with('prop-val-') {
60+
$key = 'expr:' ~ $key.substr(9);
6161
}
6262
elsif $value.isa(Pair) {
6363
($key, $value) = $value.kv;
@@ -99,8 +99,8 @@ method list($/ --> Array) {
9999
if $key.starts-with('expr-') {
100100
$key.substr-rw(4,1) = ':';
101101
}
102-
elsif $key.starts-with('val-') {
103-
$key = 'expr:' ~ $key.substr(4);
102+
elsif $key.starts-with('prop-val-') {
103+
$key = 'expr:' ~ $key.substr(9);
104104
}
105105
elsif $value.isa(Pair) {
106106
($key, $value) = $value.kv;

lib/CSS/Grammar/Test.rakumod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ our sub parse-tests($class, $input, :$parse is copy, :$actions,
100100

101101
CATCH {
102102
note "error writing: {$actual-ast.raku}";
103+
note "regenerated css: $css-again";
103104
die $_;
104105
}
105106
}

0 commit comments

Comments
 (0)