mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This change is motivated by highlighting for
test/Interpreter/SDK/lib.swift. It contains the line
// CHECK: the magic word is ///* magic *///
which without this change leaves the rest of the file highlighted as
commented out. swiftComment cannot contain swiftLineComment, or else
this:
/* // */ hello
gets incorrectly highlighted as if "hello" was commented out.
Similarly, swiftLineComment cannot contain swiftComment, or else this:
// /*
*/
gets incorrectly highlighted as if */ was closing a comment, when
actually it should be a syntax error.