aboutsummaryrefslogtreecommitdiff
path: root/spec/literal.md
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-18 23:00:43 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-18 23:00:43 -0400
commit7b36cd6a7a6d576c19c60e7842a0d0d0c460702a (patch)
tree8c66983cc29babe5f24df783dab1db879b802ebc /spec/literal.md
parent2366e5a6275d39c1bd9cab2ada26bea00394820d (diff)
Add links to html versions at the top of markdown files
Diffstat (limited to 'spec/literal.md')
-rw-r--r--spec/literal.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/literal.md b/spec/literal.md
index 937363e0..9d60f067 100644
--- a/spec/literal.md
+++ b/spec/literal.md
@@ -1,3 +1,5 @@
+*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/spec/literal.html).*
+
A *literal* is a single [token](token.md) that indicates a fixed character, number, or array. While literals indicate values of a data type, [primitives](primitive.md) indicate values of an operation type: function, 1-modifier, or 2-modifier.
Two types of literal deal with text. As the source code is considered to be a sequence of unicode code points ("characters"), and these code points are also used for BQN's character [data type](types.md), the representation of a text literal is very similar to its value. In a text literal, the newline character is always represented using the ASCII line feed character, code point 10. A *character literal* is enclosed with single quotes `'` and its value is identical to the single character between them. A *string literal* is enclosed in double quotes `"`, and any double quotes between them must come in pairs, as a lone double quote marks the end of the literal. The value of a string literal is a rank-1 array whose elements are the characters in between the enclosing quotes, after replacing each pair of double quotes with only one such quote.