ziglang / zig-mode

Zig mode for Emacs
GNU General Public License v3.0
163 stars 54 forks source link

Support multiline string literals #8

Closed mdsteele closed 6 years ago

mdsteele commented 6 years ago

Unfortunately, the normal syntax table rules don't seem to support multicharacter string delimiters such as Zig's \\ for multiline string literals. The solution is to use a syntax-propertize-function to mark the beginning \\ and ending newline as generic string delimiters.

Among other things, this change allows zig-mode to correctly apply font-lock-string-face to multiline string literals in Zig code.