grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

[SCSS] @for loop should have expressions instead of numbers

Open lmeysel opened this issue 4 years ago • 0 comments

According to https://github.com/sass/sass/blob/main/spec/at-rules/for.md the @for-loop in scss is defined as having 'from' expression ('to'|'through') expression instead of the currently given fromNumber and throughNumber

https://github.com/antlr/grammars-v4/blob/80346f3b6bb05e67aa45003531d066f1890a534f/scss/ScssParser.g4#L170-L183

For my purposes it was enough deleting fromNumber and throughNumber and replacing it with expression in forDeclaration, but I am not sure if expression in the grammar is defined in the same way as by the sass vendors, thus I hesitate to create a PR (:

//for
forDeclaration
  : AT_FOR variableName 'from' expression ('to'|'through') expression block
  ; //                         ^^^^^^^^^^                  ^^^^^^^^^^

lmeysel avatar Sep 03 '21 11:09 lmeysel