Text Document Literals
The text document literal is always of type Document.
TextDocumentLiteral:
TextDocumentDeclarator [ComplexLiteralInputChars]
TextDocumentDeclarator [Expression]
TextDocumentDeclarator:
any case for TEXT
Text document literals are used to represent a document located in
memory using a text string:
-
If the sequence of characters can be parsed as an expression of type String, then the resulting document is a text document where the expression specifies the content of the document.
-
If the sequence of characters cannot be parsed properly as described above, then it is considered to be the whole content of the document
.
Example Text Document Literals:
TEXT[This is a simple text document.]
TEXT[This is another simple text document.]
TEXT[myStringVar + u"\nAdding more information."]