SIML icon indicating copy to clipboard operation
SIML copied to clipboard

Single quotes in comments break compilation

Open Anaphase opened this issue 9 years ago • 1 comments

For some reason single quotes in comments break compilation. For example:

div
  // this is a valid comment
  p 'This is a paragraph.'

compiles fine, but this doesn't:

div
  // this isn't a valid comment
  p 'This is a paragraph.'

It returns this error: SyntaxError: SIML: Line 2, column 3: Expected "(", ":", "[", "}", AttributeName, Directive, HTML, String, [#.], [\r\n\t ], [a-z0-9_\-]i or [a-zA-Z_$] but "/" found.

I took a look through the source and I think the issue is caused by having the string tokens replaced before the comments are removed. Would it brealk anything to move the comment removal before the string tokens are replaced?

Anaphase avatar Jun 01 '16 16:06 Anaphase

Same issue happens with double-quotes.

chronologicaldot avatar May 20 '18 15:05 chronologicaldot