String
The way strings are represented in Calcit is a bit unique. Strings are distinguished by a prefix. For example, |A represents the string A. If the string contains spaces, you need to enclose it in double quotes, such as "|A B", where | is the string prefix. Due to the history of the structural editor, " is also a string prefix, but it is special: when used inside a string, it must be escaped as "\"A". This is equivalent to |A and also to "|A". The outermost double quotes can be omitted when there is no ambiguity.
This somewhat unusual design exists because the structural editor naturally wraps strings in double quotes. When writing with indentation-based syntax, the outermost double quotes can be omitted for convenience.
Tag
Tags start with :, such as :demo. They are interned identity values with the Calcit type Tag, represented by the corresponding runtime tag implementation in native and JavaScript backends. Tags are commonly used for property keys, enum-like protocol labels, and stable dispatch identities; ordinary text remains a String.