Skip to content

Commit b818826

Browse files
committed
Corrected many occurrences of "string" to "string literal"
1 parent 65219d5 commit b818826

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

specification/dartLangSpec.tex

+23-20
Original file line numberDiff line numberDiff line change
@@ -9533,7 +9533,8 @@ \subsection{Strings}
95339533
\end{grammar}
95349534

95359535
\LMHash{}%
9536-
A string can be a sequence of single line strings and multiline strings.
9536+
A string literal can be a sequence of single line strings
9537+
and multiline strings.
95379538

95389539
\begin{grammar}
95399540
<singleLineString> ::= <RAW\_SINGLE\_LINE\_STRING>
@@ -9585,24 +9586,25 @@ \subsection{Strings}
95859586
\end{grammar}
95869587

95879588
\LMHash{}%
9588-
A single line string is delimited by
9589+
A single line string literal is delimited by
95899590
either matching single quotes or matching double quotes.
95909591

95919592
\commentary{%
9592-
Hence, \code{'abc'} and \code{"abc"} are both legal strings,
9593+
Hence, \code{'abc'} and \code{"abc"} are both legal string literals,
95939594
as are \code{'He said "To be or not to be" did he not?'} and
95949595
\code{"He said 'To be or not to be' didn't he?"}.
9595-
However, \code{"This'} is not a valid string, nor is \code{'this"}.%
9596+
However, \code{"This'} is not a valid string literal, nor is \code{'this"}.%
95969597
}
95979598

95989599
\commentary{%
9599-
The grammar ensures that a single line string cannot span more than
9600+
The grammar ensures that a single line string literal cannot span more than
96009601
one line of source code,
96019602
unless it includes an interpolated expression that spans multiple lines.%
96029603
}
96039604

96049605
\LMHash{}%
9605-
Adjacent strings are implicitly concatenated to form a single string literal.
9606+
Adjacent string literals are implicitly concatenated
9607+
to form a single string literal.
96069608

96079609
\commentary{%
96089610
Here is an example:%
@@ -9615,7 +9617,7 @@ \subsection{Strings}
96159617
\rationale{%
96169618
Dart also supports the operator + for string concatenation.
96179619

9618-
The + operator on Strings requires a String argument.
9620+
The + operator on \code{String}s requires a \code{String} argument.
96199621
It does not coerce its argument into a string.
96209622
This helps avoid puzzlers such as%
96219623
}
@@ -9640,17 +9642,17 @@ \subsection{Strings}
96409642
String interpolation works well for most cases.
96419643
The main situation where it is not fully satisfactory
96429644
is for string literals that are too large to fit on a line.
9643-
Multiline strings can be useful, but in some cases,
9645+
Multiline string literals can be useful, but in some cases,
96449646
we want to visually align the code.
96459647
This can be expressed by writing
9646-
smaller strings separated by whitespace, as shown here:%
9648+
smaller string literals separated by whitespace, as shown here:%
96479649
}
96489650

96499651
\begin{dartCode}
96509652
'Imagine this is a very long string that does not fit on a line. What shall we do? '
96519653
'Oh what shall we do? '
96529654
'We shall split it into pieces '
9653-
'like so'.
9655+
'like so.'
96549656
\end{dartCode}
96559657

96569658
\LMHash{}%
@@ -9735,22 +9737,23 @@ \subsection{Strings}
97359737
\end{grammar}
97369738

97379739
\LMHash{}%
9738-
Multiline strings are delimited by either
9740+
Multiline string literals are delimited by either
97399741
matching triples of single quotes or
97409742
matching triples of double quotes.
9741-
If the first line of a multiline string consists solely of
9743+
If the first line of a multiline string literal consists solely of
97429744
the whitespace characters defined by the production \synt{WHITESPACE}
97439745
(\ref{lexicalRules}),
97449746
possibly prefixed by \syntax{`\\'},
97459747
then that line is ignored,
97469748
including the line break at its end.
97479749

97489750
\rationale{%
9749-
The idea is to ignore a whitespace-only first line of a multiline string,
9751+
The idea is to ignore a whitespace-only first line of
9752+
a multiline string literal,
97509753
where whitespace is defined as tabs, spaces and the final line break.
97519754
These can be represented directly,
97529755
but since for most characters prefixing by backslash is
9753-
an identity in a non-raw string,
9756+
an identity in a non-raw string literal,
97549757
we allow those forms as well.%
97559758
}
97569759

@@ -9768,7 +9771,7 @@ \subsection{Strings}
97689771
}
97699772

97709773
\LMHash{}%
9771-
Strings support escape sequences for special characters.
9774+
String literals support escape sequences for special characters.
97729775
The escapes are:
97739776
\begin{itemize}
97749777
\item
@@ -9814,12 +9817,12 @@ \subsection{Strings}
98149817
\end{itemize}
98159818

98169819
\LMHash{}%
9817-
Any string may be prefixed with the character \lit{r},
9818-
indicating that it is a \Index{raw string},
9820+
Any string literal may be prefixed with the character \lit{r},
9821+
indicating that it is a \Index{raw string literal},
98199822
in which case no escapes or interpolations are recognized.
98209823

98219824
\LMHash{}%
9822-
Line breaks in a multiline string are represented by
9825+
Line breaks in a multiline string literal are represented by
98239826
the \synt{LINE\_BREAK} production.
98249827
A line break introduces a single newline character (U+000A)
98259828
into the string value.
@@ -9868,12 +9871,12 @@ \subsubsection{String Interpolation}
98689871

98699872
\commentary{%
98709873
The reader will note that the expression inside the interpolation
9871-
could itself include strings,
9874+
could itself include string literals,
98729875
which could again be interpolated recursively.%
98739876
}
98749877

98759878
\LMHash{}%
9876-
An unescaped \lit{\$} character in a string signifies
9879+
An unescaped \lit{\$} character in a string literal signifies
98779880
the beginning of an interpolated expression.
98789881
The \lit{\$} sign may be followed by either:
98799882
\begin{itemize}

0 commit comments

Comments
 (0)