Emacs mode for COOL
This is a emacs major mode for the COOL language used in the Coursera
compiler course. This course is a public version of Stanford CS143.
The indentation is highly opinionated.
It is based on an answer from stack overflow
The code is heavily borrowed from the following:
- The indentation expects a coding and commenting convention
to work properly. Please see test.cl for an example.
- Keywords aren't case insensitive
- Nested comments doesn't work
- Escaped character strings might screw up
- Accepts other strings with ' or ` delimiter
- Very strange behaviour with "if" and "else" indentation,
especially when there is "if" or "else" in a comment or
a string above.
- Tested only on emacs 23.3 on Ubuntu 12.04
- ... and many more!!!