HarlemSquirrel / language-haml

Haml language grammar for GitHub's Atom IDE
MIT License
33 stars 24 forks source link

Unexpected string in ruby haml.cson #46

Closed tagrudev closed 9 years ago

tagrudev commented 9 years ago

I've just updated the package and now I get this one and I think I am not they only one check - https://github.com/atom/atom/issues/8970

Here's a stack trace

SyntaxError: Syntax error on line 241, column 18: evalmachine.<anonymous>:1
"#\\{" "end": "\\}"
       ^^^^^
Unexpected string
  at nodeTransforms.Literal (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:100:15)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at nodeTransforms.Value (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:79:14)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at /usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:114:17
  at Array.reduce (native)
  at nodeTransforms.Obj (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:107:30)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at nodeTransforms.Value (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:79:14)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at Array.map (native)
  at nodeTransforms.Arr (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:104:27)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at nodeTransforms.Value (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:79:14)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at /usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:114:17
  at Array.reduce (native)
  at nodeTransforms.Obj (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:107:30)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at nodeTransforms.Value (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:79:14)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at /usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:114:17
  at Array.reduce (native)
  at nodeTransforms.Obj (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:107:30)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at nodeTransforms.Value (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:79:14)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at /usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:114:17
  at Array.reduce (native)
  at nodeTransforms.Obj (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:107:30)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at nodeTransforms.Value (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:79:14)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at nodeTransforms.Block (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:76:14)
  at transformNode (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:197:12)
  at Object.parse (/usr/share/atom/resources/app/node_modules/season/node_modules/cson-parser/lib/parse.js:203:12)
  at parseObject (/usr/share/atom/resources/app/node_modules/season/lib/cson.js:42:23)
  at parseContents (/usr/share/atom/resources/app/node_modules/season/lib/cson.js:91:16)
  at /usr/share/atom/resources/app/node_modules/season/lib/cson.js:179:24
  at FSReqWrap.oncomplete (fs.js:100:15)
  at /home/user/.atom/packages/language-haml/grammars/ruby haml.cson:1:1

Ideas ?

ezekg commented 9 years ago

Sorry about that. I think I remember in an earlier issue (before I inherited this repo) some machines having issues with double quotes being used in the grammar file. I changed it to use single quotes. Let me know if the newest version fixes the issue. If not, could you tell me which version of Atom you're using and what operating system you're running?

tagrudev commented 9 years ago

v0.23.0 fixed the problem, thanks a lot @ezekg

ezekg commented 9 years ago

No problem. Glad it was an easy fix. :+1: