#275 Merged at c8d0b36
  1. Jiyin Yiyong

Cirru is more like a grammar than a language, read more here: http://cirru.org/

I want *.cirru *.cr to be recognized a Cirru file. *.cr is not conflicted in Pygments, but on GitHub, it is recognized for http://crystal-lang.org/ , which shares the same syntax with Ruby. Actually I want GitHub to recogize Cirru's grammer.

More details on Cirru's syntax can be found at http://grammar.cirru.org , it's actually an indentation-based reprecentation of a syntax tree. It's quite different from most languages, message me if necessary.

Comments (5)

  1. Jiyin Yiyong author

    Repling to the comments part:

    hmm, is it any indented line or just lines indented more than the starting comment?

    Yes, comments may have lines indented after the first line.

    Also, can comments come after code on the same line?

    Not quite. Comment is actually an exression in Cirru. Like set a (int 1) (-- comment).

    Do multiline comments apply there?

    Yes, but without a closing pattern, Cirru only uses indetation and closing parenthes.

    Comments are closed at the end of indentations, might like Jade.

    Well, I think that's just ok for Cirru to highlight the only lines with leading --.

    Sometimes we may have comments with some code, write:

    -- comment with code
    -- print can be write like
      print (string "something")

    If the code inside a comment is highlighted, it's still good. And meanwhile the code will not run.

    For multiline comments, just write:

    -- first line
    -- second line