Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error on Sass calculation #210

Closed
shaneog opened this issue Sep 21, 2015 · 4 comments
Closed

Parsing error on Sass calculation #210

shaneog opened this issue Sep 21, 2015 · 4 comments

Comments

@shaneog
Copy link

shaneog commented Sep 21, 2015

The following Scss code causes a parsing error:

/usr/local/lib/node_modules/sass-lint/lib/groot.js:21
    throw new Error('Parsing error' + fileInfo + ': ' + e.message);
    ^

Error: Parsing error at test.scss: Please check validity of the block starting from line #9
    at module.exports (/usr/local/lib/node_modules/sass-lint/lib/groot.js:21:11)
    at Function.sassLint.lintText (/usr/local/lib/node_modules/sass-lint/index.js:34:13)
    at /usr/local/lib/node_modules/sass-lint/index.js:87:21
    at Array.forEach (native)
    at Function.sassLint.lintFiles (/usr/local/lib/node_modules/sass-lint/index.js:86:9)
    at detectPattern (/usr/local/lib/node_modules/sass-lint/bin/sass-lint.js:16:18)
    at /usr/local/lib/node_modules/sass-lint/bin/sass-lint.js:58:5
    at Array.forEach (native)
    at Object.<anonymous> (/usr/local/lib/node_modules/sass-lint/bin/sass-lint.js:57:16)
    at Module._compile (module.js:434:26)

Versions:

$ sass-lint --version
1.2.1
$ node --version
v4.1.0
$ npm --version
3.3.3

Test Case: sass-lint -v test.scss

$radius: 45;
$pi: 3.141592653589793;

// Outer container
.radial {
  @for $j from 0 through 100 {
    &.filled_#{$j} {
      .filled {
        stroke-dashoffset: #{((100 - $j) / 100) * ($pi * ($radius * 2))};
      }
    }
  }
}
@DanPurdy
Copy link
Member

Unfortunately we're awaiting release of our AST which will fix a problem with parsing interpolation.

@DanPurdy
Copy link
Member

Hi there @shaneog I've just run this through the latest version of the AST we use gonzales-pe (3.2.1) and this is still unfortunately causing a parse error. I've filed it within an issue that you can find here

@shaneog
Copy link
Author

shaneog commented Oct 19, 2015

Thanks @DanPurdy!

@DanPurdy
Copy link
Member

@shaneog This is fixed in sass-lint 1.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants